This lesson is in the early stages of development (Alpha version)

Reproducible computational environments using containers: Introduction to Apptainer: Glossary

Key Points

Apptainer: Getting started
  • Apptainer is another container platform and it is often used in cluster/HPC/research environments.

  • Apptainer has a different security model to other container platforms, one of the key reasons that it is well suited to HPC and cluster environments.

  • Apptainer has its own container image format (SIF).

  • The apptainer command can be used to pull images from Apptainer Hub and run a container from an image file.

The Apptainer cache
  • Apptainer caches downloaded images so that an unchanged image isn’t downloaded again when it is requested using the apptainer pull command.

  • You can free up space in the cache by removing all locally cached images or by specifying individual images to remove.

Using Apptainer containers to run commands
  • The apptainer exec is an alternative to apptainer run that allows you to start a container running a specific command.

  • The apptainer shell command can be used to start a container and run an interactive shell within it.

Files in Apptainer containers
  • Your current directory and home directory are usually available by default in a container.

  • You have the same username and permissions in a container as on the host system.

  • You can specify additional host system directories to be available in the container.

Using Docker images with Apptainer
  • Apptainer can start a container from a Docker image which can be pulled directly from Docker Hub.

Preparing to build Apptainer images
  • A Docker image is provided to run Apptainer - this avoids the need to have a local Apptainer installation on your system.

  • The Docker Apptainer image can be used to build containers on Linux, macOS and Windows.

  • You can also run Apptainer containers within the Docker Apptainer image.

Building Apptainer images
  • Apptainer definition files are used to define the build process and configuration for an image.

  • Apptainer’s Docker container provides a way to build images on a platform where Apptainer is not installed but Docker is available.

  • Existing images from remote registries such as Docker Hub and Apptainer Hub can be used as a base for creating new Apptainer images.

Running MPI parallel jobs using Apptainer containers
  • Apptainer images containing MPI applications can be built on one platform and then run on another (e.g. an HPC cluster) if the two platforms have compatible MPI implementations.

  • When running an MPI application within a Apptainer container, use the MPI executable on the host system to launch a Apptainer container for each process.

  • Think about parallel application performance requirements and how where you build/run your image may affect that.

Glossary

FIXME