Singularity is an open-source container system that is widely used on HPC systems, including several machines at the Texas Advanced Computing Center (TACC). Rather than installing dependencies and compiling code for each unique system, Singularity containers are portable packages that bundle your code and dependencies together. As of the writing of this page, Singularity containers only run on Linux/Unix platforms, with a MacOS beta.
In addition, the Singularity build process creates a portable Singularity Image Format (sif) file that creates a snapshot of your code in time. You can upload this image to the Singularity Cloud Library for others to use, or keep a sif with experiment files so an experiment is always reproducible even if your source code has been modified.
Singularity is preferred on HPC systems because Docker essentially gives superuser privileges, which is not desirable on a multiuser system. In addition, Singularity containers can be incorporated into SLURM scheduling, which is significantly more difficult to do with the Docker daemon.
However, Singularity is compatible with many Docker containers. You can use a Docker container as a base in a Singularity definition file (as we do in our example), or you can build a Singularity container directly from a Docker image pulled from Docker Hub.