Apptainer

Apptainer is a lightweight container platform that is best suited for HPC platforms than Docker or Podman. It can pull docker containers and run them with ease to be compatible with existing containers.

Loading Apptainer

Apptainer is available with a Module

module load apptainer

This will make the Apptainer command available :

apptainer --version

Downloading and Interacting with Containers

apptainer pull docker://alpine

The image will be downloaded and saved locally as a .sif file. This file is executable and can be run as-is. The above command pulled the alpine_latest.sif file. To run and enter the container, simply execute the file with ./alpine_latest.sif.

And you’ll be inside the container. Be aware that default bindings exist, so that some files will be available inside the container, some not by default.

[pbondial@ec-nantes.fr@nautilus-devel-001 ~]$ ./alpine_latest.sif
Apptainer> cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.23.4
PRETTY_NAME="Alpine Linux v3.23"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"

You can check the documentation to have a sample Slurm script to run Apptainer containers.