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

Reproducible computational environments using containers: Glossary

Key Points

Getting Started with Containers
  • Containers enable you to package up an application and its dependencies.

  • By using containers, you can better enforce reproducibility, portability and share-ability of your computational workflows.

  • Apptainer (and Singularity) are container platforms and are 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 based off the original Singularity Image Format (SIF).

  • The apptainer command can be used to pull images from Docker Hub or other locations such as a website and run a container from an image file.

The Container 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.

  • Cache location and configuration requirements on Mahuika cluster

Using 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 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.

Creating Container Images
  • Definition filess specify what is within Apptainer container images.

  • The singularity build command is used to build a container image from a Definition file.

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

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

Building Container 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 Singularity Hub can be used as a base for creating new Apptainer images.

Glossary

FIXME