All material (C) 2020-2021 by CSC -IT Center for Science Ltd. This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 Unported License, http://creativecommons.org/licenses/by-sa/4.0/
yum
, apt
, etc) can be utilized even when not available in the target system.Pull a container from registry
docker pull <container>
Run a container
docker run [options] <container>
--nv
sinteractive
Execute a command in the container
singularity exec [options] <container> <command>
Run the default action (runscript) of the container
singularity run [options] <container>
Open a shell in the container
singularity shell [options] <container>
Check the developer documentation
Check container help
singularity run-help image.sif
Try running find
inside the container to find file paths
singularity exec image.sif find / -type f -name my_app.py 2>/dev/null
find
is available in the container/scratch/project_12345
to directory /data
inside the container: --bind /scratch/project_12345:/data
--cleanenv
$SINGULARITYENV_variablename
.
$TEST
in container, set $SINGUALRITYENV_TEST
in hostRunning containers with singularity_wrapper
takes care of most common --bind
commands
singularity_wrapper exec image.sif myprog <options>
If environment variable $SING_IMAGE
is set with the path to the image, even image file can be omitted
singularity_wrapper exec myprog <options>
You can build a Singularity container from a Docker container with normal user rights:
singularity build <image> docker://<address>:<tag>
For example:
singularity build pytorch_19.10-py3.sif docker://nvcr.io/nvidia/pytorch:19.10-py3
Documentation in Docs: