zavolanlab / htsinfer

Infer metadata for your downstream analysis straight from your RNA-seq data
Apache License 2.0
10 stars 22 forks source link

Docker image for the htsinfer project #96

Closed BorisYourich closed 1 year ago

BorisYourich commented 1 year ago

Is your feature request related to a problem? Please describe. This Issue stems from the fact that conda on macOS(Monterey and possibly higher) with arm64 chip is not able to create htsinfer environment due to the following error:

Solving environment: failed

ResolvePackageNotFound: 
  - kallisto[version='>=0.46.1']
  - star[version='>=2.7.6']
  - pysam[version='>=0.16.0']

Describe the solution you'd like I couldn't find any user-friendly fix or workaround, and since I sometimes develop on a mac I decided to create a docker image.

Describe alternatives you've considered NA

Additional context The image can be downloaded by docker pull edirexbot/htsinfer:dev and executed via:

docker run --platform linux/amd64 \
      -v $HOME/htsinfer/tests/files/:/tmp \
      edirexbot/htsinfer:dev htsinfer /tmp/adapter_single.fastq

--platform switch is there specifically for the arm64 architecture of the mac M1 chip and is not necessary. The volume is mounted on the /tmp directory in the container in this case, but similarly the command:

docker run edirexbot/htsinfer:dev htsinfer tests/files/adapter_single.fastq

could have been executed instead, as the entire htsinfer repo is inside the container in the /htsinfer directory.

The image is built by creating the conda environment inside the image. This is just a temporary solution that was easy to implement. If the container version of htsinfer is something that is desired, I could install the dependencies without the conda and make the image a bit more lightweight and also include the docker image build in the CI/CD pipeline when the dev branch is changed.

uniqueg commented 1 year ago

@BorisYourich Cool! If the image builds on Linux as well, I'll be happy to replace the existing Dockerfile. Can easily be tested via GitHub Actions. Certainly better than having to maintain two Dockerfiles / images.