Reproducible Computational Environments Using Containers: Introduction to Docker and Singularity (day 2)

This is the material for day 2 of the workshop. The material for day 1 can be found at: Introduction to Docker.

This lesson provides an introduction to using the Singularity container platform. 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 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

There are two core elements to this lesson - running containers and building containers. The prerequisites are slightly different for each and are explained below.

Running containers: (episodes 1-5 and 8)

Building containers: (episodes 6 and 7) Building containers requires access to a platform with an installation of Singularity on which you also have administrative access. If you run Linux and are comfortable with following the Singularity installation instructions, then installing Singularity directly on your system is an option. However, we strongly recommend using the Docker Singularity container for this section of the material. Details are provided on how to use the container in the relevant section of the lesson material. To support building containers, the prerequisite is therefore:

  • Access to a system with Docker installed on which you can run the Docker Singularity container.

    OR

  • Access to a local or remote Linux-based system on which you have administrator (root) access and can install the Singularity software.

Schedule

Setup Download files required for the lesson
Day 1 10:00 1. Singularity: Getting started What is Singularity and why might I want to use it?
10:50 2. The Singularity cache Why does Singularity use a local cache?
Where does Singularity store images?
11:00 3. Break Break
11:15 4. Using Singularity containers to run commands How do I run different commands within a container?
How do I access an interactive shell within a container?
11:30 5. Files in Singularity containers How do I make data available in a Singularity container?
What data is made available by default in a Singularity container?
11:50 6. Using Docker images with Singularity How do I use Docker images with Singularity?
12:05 7. Preparing to build Singularity images What environment do I need to build a Singularity image and how do I set it up?
12:40 8. Lunch Break
13:40 9. Building Singularity images How do I create my own Singularity images?
14:40 10. Break Break
14:55 11. Running MPI parallel jobs using Singularity containers How do I set up and run an MPI job from a Singularity container?
16:05 Finish

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