Giter Club home page Giter Club logo

Comments (5)

pvanheus avatar pvanheus commented on September 26, 2024

Hi there

I'll look into adding it to the wrapper, but if you want to use Singularity with nextstrain you can:

  1. 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'
  1. running the ncov pipeline from within a cloned copy of the ncov github repository, this does nextstrain 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.

tsibley avatar tsibley commented on September 26, 2024

Thanks for looking into this @pvanheus! If you have any questions about how the CLI works, feel free to ask them here.

from cli.

huddlej avatar huddlej commented on September 26, 2024

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.

  1. Install singularity (singularity pull nextstrain.sif docker://nextstrain/base:latest).
  2. Pull latest snakemake pipeline repo (git clone https://github.com/nextstrain/ncov.git)
  3. Update data files, configs, etc
  4. 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.

pvanheus avatar pvanheus commented on September 26, 2024

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.

tsibley avatar tsibley commented on September 26, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.