Apptainer
A Docker-compatible container platform for HPC
Software containerization is a popular solution for environment-level reproducibility. Apptainer is a software containerization solution for HPC and cluster systems such as the FSU HPC. It is compatible with Docker and is capable of automatically converting Docker containers to Apptainer containers
Note
Apptainer was previously known as 'Singularity'. In November, 2021 it was rebranded to 'Apptainer'. For backward
compatibility, you can still use the singularity
command as a substitute for the apptainer
command.
Basic Usage#
The apptainer
command is available by default when you log in to the HPC cluster.
The run
command syntax is as follows:
Full Apptainer documentation and example use are available at the official Apptainer User Guide.
A note about Docker#
Docker is NOT available on the HPC. We require all users needing to use Docker containers convert them to Apptainer containers. See below for instructions on how to convert/import Docker containers to Apptainer.
Running Docker containers in Apptainer#
Note
This is a summary of the documentation found at the official documentation site.
To run a Docker container in Apptainer on the HPC, execute the command, apptainer run docker://[REPO]/[IMAGE:TAGS]
.
For example, to run the lolcow
image provided by Syslabs:
The first time you run this command, it will automatically download the Docker image and convert it into a .sif
image
file. The .sif
file will be stored in your home directory in a hidden folder: ~/.apptainer
.
Subsequent runs will use the cached image file, unless you specify otherwise:
To "bust" the cache, and pull the original image, add the --disable-cache
option:
Specifying a custom cache directory#
By default, Apptainer creates a hidden directory in your home directory for building/converting workflows:
Apptainer typically cleans up when it completes, but images are cached in that directory. If you use Apptainer and
are running up against your quota, you may consider specifying a custom cache directory via the APPTAINER_CACHEDIR
environment variable:
More information specifying a custom cache directory can be found at the official Apptainer documentation.
Building containers and comprehensive tutorial#
For a comprehensive tutorial on Apptainer, refer to the official quickstart guide.