Making your own Singularity image
Full documentation for creating new images can be found on the Singularity website
The main steps are:
- Install Singularity on your own computer (Linux laptop/desktop or virtual machine). This is needed since bootstrapping and modifying images requires superuser (root) access, and you don't have that on the NSC clusters. If you cannot install software on your own computer or run a virtual machine, you can use Singularity Hub to make images.
- Create a container image and bootstrap it (fill it with the operating system and applications you need)
- Modify the container (e.g add NSC directories /proj, /scratch/local, /software)
- Test the container on your own computer (usually this is possible, but if you use Infiniband or MPI it might not be possible)
- Copy the container image to NSC (e.g using scp)
- Run the container at NSC (interactively or as a batch job)
NSC recommends using the default (squashfs) image format.
A sample batch job script that uses Singularity to run an application on a full compute node for up to 24 hours:
#SBATCH -t 24:00:00
singularity exec --bind /proj:/proj /proj/myproj/myimage.sif myapplication --someoption /proj/myproj/my_input_data.dat