Computing : Apptainer/Singularity Cache and TMP Directories

Singularity to Apptainer renaming

Singularity has been renamed to Apptainer in 2022 due to legal constraints. In general, just the name has changed and all options are the same. Replacing the command `singularity` with `apptainer` should work on updated systems.

If you pull a lot of Docker images/containers or very large images, your Apptainer/Singularity directories to build and cache the files might get to small.

To change these directories to something larger, create the new target directories on a suitable storage and export the following environment variables

export SINGULARITY_TMPDIR=/PATH/TO/STORAGE/singularity/tmp

export SINGULARITY_CACHEDIR=/PATH/TO/STORAGE/singularity/cache

on updated systems with Singularity renamed to Apptainer, the corresponding APPTAINER_ environment variables should work as well (SINGULARITY_ environment variables are evaluated as well)

export APPTAINER_TMPDIR=/PATH/TO/STORAGE/singularity/tmp

export APPTAINER_CACHEDIR=/PATH/TO/STORAGE/singularity/cache

(for problems with not enough space in a container's temporary directoreis see Problems in Containers with 'No space left on device' due to limited TMP directories )