SingularityCE¶
SingularityCE (formerly Singularity) is the standard
option for HPC platforms given its non sudo
requirements to run code on nodes unlike Docker.
Such privileges are however required at build time.
Important
The documentation will emphasize on SingularityCE since it is the standard HPC module installed at CEA, Saclay.
It should however also work with Apptainer containers but has not been tested.
SingularityCE allows to build Linux-based containers .sif from
SingularityCE Definition Files .def. These definition files
are very similar to Docker’s Dockerfiles but in a more
transparent manner with explicit shell scripts running at build time.
This build method ensures the most repdroducible containers. Other sandbox methods are also available, but less reliable when it comes to defining build consistent build environments.
Most container images are based on:
a Linux distribution (e.g. Ubuntu, CentOS, Rocky, …),
some more base environment (e.g. Python, CUDA, Qt, …).
SingularityCE containers and images can of course be
based of (or rather bootstrapped from) Docker images.
See SingularityCE preferred bootstrap agents.
For instance the rocky-cuda.def recipe defines a
Rocky Linux 8 container from a Docker NVIDIA CUDA
development image: cuda_11.5.2-devel-rockylinux8.
It is then possible to chain different images
for a more broad and modular approach.
Follow the subsections below to get started using SingularityCE:
SINGULARITY COMMUNITY EDITION CONTENTS