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

Reproducible computational environments using containers: Introduction to Apptainer/Singularity

This lesson provides an introduction to using the Apptainer/Singularity container platform. Apptainer/Singularity is particularly suited to running containers on infrastructure where users don’t have administrative privileges, for example shared infrastructure such as High Performance Computing (HPC) clusters.

This lesson will introduce Apptainer/Singularity from scratch showing you how to run a simple container and building up to creating your own containers and running parallel scientific workloads on HPC infrastructure.

Prerequisites

  • Basic knowledge of the Unix Shell, e.g., from the carpentry course.
  • Knowledge of using the SLURM scheduler at MSI
  • An active MSI account if you plan to follow along with the examples.

** For this training we recommend Apptainer >= 1.0 or Singularity >= 3.5. Older versions may not have some of the features or behave differently

Schedule

Setup Download files required for the lesson
Day 1 00:00 1. Apptainer: Getting started What is Apptainer and why might I want to use it?
What issues motivated the creation of Apptainer?
What are the differences between Docker, Apptainer, and Singularity?
00:50 2. Containers and Images How to pull Apptainer images from the libraries?
How to run commands inside the containers?
01:15 3. The image cache Why does Apptainer use a local cache?
Where does Apptainer store images?
01:25 4. Building Containers How to build containers with my requirements?
02:35 5. Containers from definition files How to easily build and deploy containers from a single definition file?
03:45 6. Sharing files between host and container How to read and write files on the host system from within the container?
04:15 7. Running jobs using Apptainer containers How do I set up and run a SLURM job from a Apptainer container?
How do I set up and run an parallel MPI job from a Apptainer container?
05:25 8. Apptainer instances How can I keep my container running in the background?
What are the use cases for instances?
06:35 Finish

The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.