Containers
Apptainer
Apptainer (https://apptainer.org) is an open-source software developed to add containers and reproducibility to scientific high performance computing.
Just like its predecessor Singularity, Apptainer is being developed to provide container technologies on HPC systems. It gives users an easy way to access different OSs on the HPC systems while still ensuring that containers runs in an established user environment, without a pathway for privilege escalation on the host.
Apptainer was born in 2021, when the Singularity open source project split into two separate projects: Apptainer and SingularityCE. The Apptainer branch has joined the Linux Foundation, while the Sylabs’ fork of Singularity, dedicated to commercial use, was renamed SingularityCE. While, at least at the beginning, there has been continual alignment between Sylabs’ SingularityCE and Apptainer, over time the paths of the projects will likely diverge as both projects continue to mature.
As part of the transition, only open community standard interfaces will be supported in Apptainer. This includes removing the “Library” and “Remote Builder” support.
In the event these become open community maintained standards (and not corporate controlled), these feature may be left intact and/or re-add at a later date.
For this reason, users of the old Singularity software are encouraged to adjust their scripts accordingly.
On top of the apptainer
command, Apptainer provides backwards compatibility offering singularity
as a command line link. It is also committed to maintain as much of the CLI and environment functionality available in the old Singularity software as possible. From the user’s perspective, very little, if anything, should change and the wrapper around the singularity
command allows users to run commands like ‘singularity pull’, ‘singularity run’, etc. just as before.
Please, visit https://apptainer.org for additional information on the Apptainer software and access to its documentation.
Examples of Apptainer commands
The following table summarizes some Apptainer commands (based on version 1.0.3). For more information see the Apptainer User Guide at https://www.apptainer.org/docs/.
General commands | |
help | Help about any command |
Usage commands | |
build | Build an Apptainer image |
cache | Manage the local cache |
capability | Manage Linux capabilities for users and groups |
exec | Run a command within a container |
inspect | Show metadata for an image |
instance | Manage containers running as services |
key | Manage OpenPGP keys |
oci | Manage OCI containers |
plugin | Manage apptainer plugins |
pull | Pull an image from a URI |
push | Upload image to the provided URI |
remote | Manage apptainer remote endpoints |
run | Run the user-defined default command within a container |
run-help | Show the user-defined help for an image |
search | Search a Container Library for images |
shell | Run a shell within a container |
sif | siftool is a program for Singularity Image Format (SIF) file manipulation |
sign | Attach a cryptographic signature to an image |
test | Run the user-defined tests within a container |
verify | Verify cryptographic signatures attached to an image |
version | Show the version for Apptainer |
Global options | |
-d --debug | print debugging information (highest verbosity) |
-h --help | help for apptainer |
-q --quiet | suppress normal output |
-s --silent | only print errors |
-v --verbose | print additional information |
The help command gives an overview of Apptainer options and subcommands.
For example:
$ apptainer help <command> [<subcommand>]
$ apptainer help build
$ apptainer help instance start
Apptainer on the MPCDF HPC systems
On the HPC clusters at MPCDF, an environment module is provided in order to load the Apptainer software. For backwards compatibility, a Singularity module (singularity/link2apptainer) is also provided which will print a warning message and load the default Apptainer module. The old Singularity as well as the new SingularityCE software will not be supported on the HPC clusters.