Using Singularity on Our Clusters§
Singularity is installed on all our clusters. You can use containers you have downloaded in your space.
singularity --version to see which version we currently have installed.
Set up cache locations and bind directories§
The cache directories should be set to somewhere in your space so they don't fill up
/tmp on the login nodes.
The bindpath specifies what directories are made available inside the container - only your home is bound by default so you need to add Scratch.
# Create a .singularity directory in your Scratch mkdir $HOME/Scratch/.singularity # Set all the Singularity cache dirs to Scratch export SINGULARITY_CACHEDIR=$HOME/Scratch/.singularity/ export SINGULARITY_TMPDIR=$SINGULARITY_CACHEDIR/tmp export SINGULARITY_LOCALCACHEDIR=$SINGULARITY_CACHEDIR/localcache export SINGULARITY_PULLFOLDER=$SINGULARITY_CACHEDIR/pull # Bind your Scratch directory so it is accessible from inside the container export SINGULARITY_BINDPATH=/scratch/scratch/$USER
Different subdirectories are being set for each cache so you can tell which files came from where.
You probably want to add those
export statements to your
# User specific aliases and functions so those environment variables are always set when you log in.
For more information on these options, have a look at the Singularity documentation: