Comments (5)
Hi there
I'll look into adding it to the wrapper, but if you want to use Singularity with nextstrain you can:
- build a singularity image (I used a specific tagged version for this, see Docker Hub for list of tags:
singularity build nextstrain-base-build-20200309T035736Z.simg 'docker://nextstrain/base:build-20200309T035736Z'
- running the
ncov
pipeline from within a cloned copy of the ncov github repository, this doesnextstrain build .
singularity exec -B $(pwd):/nextstrain/build nextstrain-base-build-20200309T035736Z.simg snakemake --printshellcmds
For reference, the Docker command that this nextstrain build .
runs is:
docker run --rm --tty --interactive --user=$(id -u):$(id -g) --volume=$(pwd):/nextstrain/build --workdir=/nextstrain/build --env=AUGUR_RECURSION_LIMIT --env=AUGUR_MINIFY_JSON --env=AWS_ACCESS_KEY_ID --env=AWS_SECRET_ACCESS_KEY --env=AWS_SESSION_TOKEN --env=ID3C_URL --env=ID3C_USERNAME --env=ID3C_PASSWORD --env=RETHINK_HOST --env=RETHINK_AUTH_KEY nextstrain/base snakemake --printshellcmds
from cli.
Thanks for looking into this @pvanheus! If you have any questions about how the CLI works, feel free to ask them here.
from cli.
Kim Lauer shared their experience running Nextstrain with the CLI and Docker image via Singularity. I'm copying the bulk of their message here for our future reference when thinking about how (or whether) to support Singularity:
I thought I would share how we are running the github snakemake pipeline using singularity on a cluster that does not support docker.
- Install singularity (singularity pull nextstrain.sif docker://nextstrain/base:latest).
- Pull latest snakemake pipeline repo (git clone https://github.com/nextstrain/ncov.git)
- Update data files, configs, etc
- run (singularity exec --cleanenv nextstrain.sif snakemake --profile my_profiles/<my_user_profile>)
It doesn’t use docker, but the Singularity environment + Nextstrain CLI.
The only limitations I have found so far is I can’t update the image and need to re-install when new software versions come out (when I run nextstrain update inside the container it fails) and pangolin isn’t installed inside the container so I have not been able to take advantage of the run_pangolin feature that looks like it was added in April.
from cli.
This works fairly similarly for ncov-ingest:
SINGULARITYENV_GISAID_API_ENDPOINT=https://www.epicov.org/BLAH
SINGULARITYENV_GISAID_USERNAME_AND_PASSWORD=USER:PASSWORD
singularity exec /tools/containers/nextstrain/ncov-ingest.sif snakemake --configfile config/local_gisaid.yaml
Note that the above does not make use of multiple cores and is thus slower than is necessary. Use the --cores
option of snakemake to set the number of cores to use.
from cli.
@pvanheus FWIW, the just-released Nextstrain CLI 6.1.0 now supports Singularity directly. If you want to give it a go, please do report back any issues, suggestions, etc. :-)
from cli.
Related Issues (20)
- nextstrain view can't connect to host on a Mac inside a Conda environment HOT 8
- Use same version resolution method in `nextstrain setup conda` as `nextstrain update conda` HOT 1
- Invalid `~/.shrc` file named in standalone installer instructions HOT 5
- Broken CI due to upstream release; mypy implicated HOT 1
- Consider UI/UX for AWS Batch runtime without Docker runtime HOT 1
- Singularity/Apptainer Version HOT 4
- remote/s3 should instantiate its own MimeTypes instance
- CLI-ception: Some commands do not work in managed runtime shells HOT 4
- Extend validity of login refresh tokens to 90 days from 30 days HOT 1
- Unhandled exception when renewing login from a different Cognito user pool HOT 1
- Pass AWS credentials from standard file to Docker HOT 1
- Show progress during `check-setup` HOT 1
- Unable to set up Singularity runtime on Fred Hutch's `rhino` HOT 2
- shell: Command hangs when `--conda` is used and the runtime has not been set up HOT 13
- Update pinned version of micromamba (1.1.0 -> 1.5.8) as it's been 9 months since last bump
- Update "build directory" terminology in help and docs HOT 1
- Scheduled CI failed across macOS due to IQTree error: `Invalid "-ntmax" option` HOT 2
- aws-batch: support Snakemake `--report` HOT 7
- Scheduled CI hanging on `macos-11` job
- CI failing: unable to pull `hello-world:latest` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.