Reproducible computational environments using containers

Description

This course aims to introduce the use of containers with the goal of using them to effect reproducible computational environments. Such environments are useful for ensuring reproducible research outputs and for simplifying the setup of complex software dependencies across different systems. The course will mostly be based around the use of Docker containers but the material will be of use for whatever container technology you plan to, or end up, using. We will also briefly introduce the Singularity container environment which is compatible with Docker and designed for use on multi-user systems (such as HPC resources). On completion of this course attendees should:

General Information

When: 10:00-16:00 BST, 13 - 14 July 2020. Add to your Google Calendar.

Requirements: Participants must bring a laptop with a Mac, Linux, or Windows operating system (not a tablet, Chromebook, etc.) that they have administrative privileges on. They should have a few specific software packages installed (listed below). They are also required to abide by the ARCHER2 Training Code of Conduct.

Accessibility: We are committed to making this workshop accessible to everybody.

Materials will be provided in advance of the workshop and large-print handouts are available if needed by notifying the organizers in advance. If we can help making learning easier for you please get in touch (using contact details below) and we will attempt to provide them.

Contact: Please email support@archer2.ac.uk for more information.


Prerequisites

  • You should have basic familiarity with using a command shell, and the lesson text will at times request that you “open a shell window”, with an assumption that you know what this means.
    • Under Linux or macOS it is assumed that you will access a bash shell (usually the default), using your Terminal application.
    • Under Windows, Powershell and Git Bash should allow you to use the Unix instructions.
  • As an item of setup, it is assumed that you have a directory named container-playground that you are able to cd to using your command shell, and are also able to find using your computer’s graphical file browser (e.g., Finder on macOS or Windows Explorer). A simple way to achieve this is to create your container-playground directory within your computer’s Desktop folder. (See the Software Carpentry Shell lesson for more details.)
  • The lessons will sometimes request that you use a text editor to create or edit files in particular directories. It is assumed that you either have an editor that you know how to use that runs within the working directory of your shell window (e.g. nano), or that if you use a graphical editor, that you can use it to read and write files into the working directory of your shell.

Getting Started

To get started, follow the directions on the Setup page to ensure you have installed the Docker software, have registered for a Dockerhub account, have an SSH client available and have registered a user account on Cirrus (the HPC facility we will be using for the Singularity part of the course.


Schedule

Setup Download files required for the lesson
Day 1 10:00 1. Introducing containers What are containers, and why might they be useful to me?
10:40 2. Introducing the Docker command line How do I interact with Docker?
10:55 3. Break Break
11:10 4. Creating containers How do I get Docker to perform computation?
12:00 5. Lunch Break
14:00 6. Visiting the Docker Hub What is the Docker Hub, and why is it useful?
14:20 7. Creating your own container images How can I make my own Docker images?
15:05 8. Break Break
15:20 9. Example: Containers used in generating this lesson What is a specific example of a container used in practice?
15:40 10. Containers in research workflows: reproducibility and granularity How can I use container images to make my research more reproducible?
How do I incorporate containers into my research workflow?
What are container orchestration tools and how can they potentially help me?
16:00 Finish
Day 2 10:00 11. Singularity: Getting started What is Singularity and why might I want to use it?
10:30 12. Working with Singularity containers How do I run a shell or different commands within a container?
Where does Singularity store images?
11:10 13. Break Break
11:25 14. Building Singularity images How do I create my own Singularity images?
12:05 15. Lunch Break
14:05 16. Running MPI parallel jobs using Singularity containers How do I set up and run an MPI job from a Singularity container?
14:55 17. Bootstrapping your use of Containers How can I get started using containers in my research?
Where can I get help to start using containers?
16:00 Finish

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