Singularity Image


I am trying to set up a local Nextstrain build for SARS-CoV-2 sequenicng surveillance. My compute cluster does not get along with docker, but singularity works fine. I installed the latest version simply enough with “singularity pull docker://nextstrain/base:latest” however when I run " singularity pull docker://nextstrain/base" it returns that docker is not supported. Is there a way to force set the environment to singularity or docker via singularity in some way?


Hi @whottel! We don’t have much experience with Singularity on our team, other than some tentative, incomplete efforts to use the Nextstrain Docker image with Singularity on our own SLURM cluster. Running with nextstrain/base:latest is a safe bet, generally, though, if you have a way to specify that version information when you run your analyses.

On a related note, would you be willing to share here how you’re running your analyses with Singularity on your cluster? I bet other folks would be interested in your efforts here and, if your solution seems generally applicable, we could add your notes to the official workflow documentation.

Unfortunatley, I will not be very helpful as I ended up going with the conda/snakemake route.
For what It might be worth, as stated above in my post I opened an interactive singualrity shell with the nextstrain image to see if docker was recognized as a supported environment.

nextstrain check-setup --set-default

did not return docker as a supported envirnoment.

Also tried an non-interactive shell approach:

singularity exec -e -B .:/data --pwd /data -H <Path/to/working/directory> </Path/to/singularity/image.sif> nextstrain check-setup --set-defualt

Again, docker not supproted.


Ah, I see; I misunderstood the Singularity environment + Nextstrain CLI context. The nextstrain command doesn’t support Singularity yet but there is an open issue to add this support eventually. Whether that issue gets resolved will depend on demand for that feature.

I’m glad the Conda + Snakemake approach is working though!