Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such...
Transcript of Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such...
Containers On HPCAmr Radwan
HPC Applications Specialist Supercomputing Core Laboratory
Outline
● Why containers?● What is a container?● Containers solutions on HPC● Singularity containers● Demos● Open discussion
● Why containers
● Why containers
● Some programs require complex software environments ○ OS type and versions ○ Drivers ○ Compiler type and versions○ Software dependencies
■ glibc, stdlibc++ versions■ Other libraries and executables■ Python/R libraries
● Old applications built on old Linux versions can run on newer Linux host
Difference between VMs and Containers
What is a container
Image Source: https://www.slideshare.net/arafkarsh/docker-container-linux-container
Containers Solutions in HPC
● Docker○ Well established ○ Has docker hub for container sharing ○ Problematic with HPC
● Singularity ○ Designed for HPC, user friendly○ Support for MPI, GPUs
● Charliecloud and Shifter○ Also HPC designed, built on top of Docker○ Simple but less user friendly
Singularity Containers
Singularity began as an open-source project in 2015, when a team of researchers at Lawrence Berkeley National Laboratory, led by Gregory Kurtzer, developed the initial version and released it under the BSD license
By the end of 2016, many developers from different research facilities joined forces with the team at Lawrence Berkeley National Laboratory to further the development of Singularity
In 2017 Singularity also won the first place for the category ″Best HPC Programming Tool or Technology″
https://en.wikipedia.org/wiki/Singularity_(software)
Singularity Features
● Integrate with traditional HPC○ Support natively high-performance interconnects, such as InfiniBand
and Intel Omni-Path Architecture (OPA)○ Singularity can support any PCIe-attached device within the
compute node, such as graphic accelerators.○ Same user inside and outside of the container○ Singularity has also native support for Open MPI library○ Can integrate with existing software
● Portable and shareable○ A container is a file○ It can be built on one OS and run on another
Singularity Key Concepts
● Singularity Architecture● Singularity Workflow● Singularity container image● Name-spaces and isolation
Singularity Architecture
Image Source:https://pdfs.semanticscholar.org/presentation/18f6/40085071afdbd20f644e6945f07d3343dd4d.pdf
Singularity Workflow
Singularity Container Image
● Singularity makes use of a container image file, which physically contains the container. This file is a physical representation of the container environment itself. If you obtain an interactive shell within a Singularity container, you are literally running within that file.
● When Singularity builds the container, output can be one of a few formats:○ default: The compressed Singularity read only image format (default)○ sandbox: This is a read-write container within a directory structure
Singularity Name-Spaces
By default, Singularity starts containers with a separate mount namespace only. This gives the container its own filesystem, but doesn’t isolate processes and networking in the same way as Docker.
Workflow Singularity Hub
Image Source: https://rse-cambridge.github.io/hpc-container-workshop/docs/Singularity_Cambridge_keynote.pdf
Demos
Singularity Demos● Installing Singularity
Singularity Demos● Building Singularity image (Recipe File)
Singularity Demos● Building Singularity image
Singularity Demos● MPI Hello World on Ibex
Singularity Demos● MPI Hello World on Shaheen
Singularity Demos● Tensorflow GPU on Ibex
Singularity Demos● Web server in container
Singularity Demos● Spark cluster inside
containers
Singularity Demos● Spark cluster inside
containers
Thank You