Linux containers are self-contained execution environments that share a Linux kernel with the host, but have isolated resources for CPU, I/O, memory, etc. A container can run a completely different Linux environment, without the overhead required by virtual machines.
Benefits of containers¶
- Reproducible science - containers can include an application and its dependencies, and be run on other systems where Singularity is installed.
- Version independent - run code designed for other versions of Linux e.g. safely run legacy code.
- Self-contained - allow isolation of complicated application installs.
Singularity is a popular Open Source container solution designed for HPC. Unlike other container solutions such as Docker, it allows utilisation of GPUs and Infiniband interconnects for MPI jobs, and does not allow privilege escalation within a container, which would compromise the security in a multi-user environment with a shared filesystem.
After researching the options, and running a pilot phase with users, Singularity was selected for the Apocrita HPC cluster.
Using Singularity on Apocrita¶
Singularity is available as a module on Apocrita. To access the Singularity command:
module load singularity
You should use the default version of the Singularity module on Apocrita which is usually the latest version installed. Because of the privileged nature of the Singularity package it may be necessary for older versions to be removed for security reasons.