genomescope2.0 icon indicating copy to clipboard operation
genomescope2.0 copied to clipboard

added a Dockerfile

Open molikd opened this issue 3 years ago • 1 comments

I created a Dockerfile for a pipeline I'm currently working on that uses Singularity.

This pull request creates a Dockerfile that when run (say through a github actions pipeline or webhook) in turn creates a docker container. I use this container with Singularity, but there is no reason it shouldn't run with Docker.

The container build utilizes an Alpine image and tries its best to only add the bare minimum to the image. It also installs in what would be a 'system wide approach' in a non-container setup; this explains why it doesn't use 'install.R' and instead relies on:

RUN Rscript -e 'install.packages("argparse", repos="https://cloud.r-project.org")' \
  && Rscript -e 'install.packages("minpack.lm", repos="https://cloud.r-project.org")'  

Another quirk is that it currently has a hotfix, genomescope doesn't work with R 4.X.X when I checked yesterday, so it installs R 3.6.3, but this whole section can be removed when genomescope does work with 4.X.X

One last thought, genomescope requires X11, which a headless container wouldn't normally have, to get around this I run genomescope via xvfb-run which spoofs X11. That means that when running through singularity the call becomes something like:

$ singularity exec dmolik-genomescope2.img xvfb-run  genomescope.R -i 1631574947.histo -o 1631574947 -k 21 --verbose

Feel free to check out the container I built from genomescope here:

https://hub.docker.com/repository/docker/dmolik/genomescope2

molikd avatar Sep 14 '21 22:09 molikd

Cool! Thanks for the contribution!

Mike

On Tue, Sep 14, 2021 at 6:05 PM David Molik @.***> wrote:

I created a Dockerfile for a pipeline I'm currently working on that uses Singularity.

This pull request creates a Dockerfile that when run (say through a github actions pipeline or webhook) in turn creates a docker container. I use this container with Singularity, but there is no reason it shouldn't run with Docker.

The container build utilizes an Alpine image and tries its best to only add the bare minimum to the image. It also installs in what would be a 'system wide approach' in a non-container setup; this explains why it doesn't use 'install.R' and instead relies on:

RUN Rscript -e 'install.packages("argparse", repos="https://cloud.r-project.org")'
&& Rscript -e 'install.packages("minpack.lm", repos="https://cloud.r-project.org")'

Another quirk is that it currently has a hotfix, genomescope doesn't work with R 4.X.X when I checked yesterday, so it installs R 3.6.3, but this whole section can be removed when genomescope does work with 4.X.X

One last thought, genomescope requires X11, which a headless container wouldn't normally have, to get around this I run genomescope via xvfb-run which spoofs X11. That means that when running through singularity the call becomes something like:

$ singularity exec dmolik-genomescope2.img xvfb-run genomescope.R -i 1631574947.histo -o 1631574947 -k 21 --verbose

Feel free to check out the container I built from genomescope here:

https://hub.docker.com/repository/docker/dmolik/genomescope2

You can view, comment on, or merge this pull request online at:

https://github.com/tbenavi1/genomescope2.0/pull/2 Commit Summary

  • added Dockerfile
  • Update Dockerfile

File Changes

Patch Links:

  • https://github.com/tbenavi1/genomescope2.0/pull/2.patch
  • https://github.com/tbenavi1/genomescope2.0/pull/2.diff

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tbenavi1/genomescope2.0/pull/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABP344EMUIQHIMQDNA6KYTUB7BKXANCNFSM5EBC2LTA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

mschatz avatar Sep 15 '21 01:09 mschatz