Running NorESM in a container

What is a container?

A container is a unit of software that bundles a code and all its software dependencies so that an application can run quickly in various computing environments

A container image is a standalone, executable package which includes everything needed to run an application: source code, compilers, libraries, etc.

Images become containers at runtime when they run on a container engine (like Docker, Singularity, Shifter, CharlieCloud, etc.)

(Inspired from https://www.docker.com/resources/what-container)

Docker

Docker is probably the most popular platform for creating and distributing container images

It is very easy to install (especially on Linux machines) and well documented

Note

Containers isolate applications from their environment

Singularity

Compared to Docker, Singularity exhibits several features which make it more suitable for use on HPC, and in particular:

  • there is no privilege escalation inside Singularity containers (user outside == user inside)

  • it does not requires any system changes for HPC

  • it provides a simple integration with resource managers (like Slurm)

Also, from the user point-of view:

  • Singularity uses a single-file based container format (SIF™ = Singularity Image File)

  • it supports multiple architectures (x86-64, PPC, )

however

  • building container images from a Singularity definition file (.def) is tedious (although the content is similar to that of a Dockerfile)

  • it is possible to convert a Docker image into Singularity

  • the size of a Singularity Image File is significantly smaller than the equivalent Docker image archive