Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such...

26
Containers On HPC Amr Radwan HPC Applications Specialist Supercomputing Core Laboratory

Transcript of Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such...

Page 1: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

Containers On HPCAmr Radwan

HPC Applications Specialist Supercomputing Core Laboratory

Page 2: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

Outline

● Why containers?● What is a container?● Containers solutions on HPC● Singularity containers● Demos● Open discussion

Page 3: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

● Why containers

Page 4: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

● 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

Page 5: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

Difference between VMs and Containers

Page 6: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

What is a container

Image Source: https://www.slideshare.net/arafkarsh/docker-container-linux-container

Page 7: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

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

Page 8: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

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)

Page 9: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

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

Page 10: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

Singularity Key Concepts

● Singularity Architecture● Singularity Workflow● Singularity container image● Name-spaces and isolation

Page 11: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

Singularity Architecture

Image Source:https://pdfs.semanticscholar.org/presentation/18f6/40085071afdbd20f644e6945f07d3343dd4d.pdf

Page 12: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

Singularity Workflow

Page 13: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

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

Page 14: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

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.

Page 15: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

Workflow Singularity Hub

Image Source: https://rse-cambridge.github.io/hpc-container-workshop/docs/Singularity_Cambridge_keynote.pdf

Page 16: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

Demos

Page 17: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

Singularity Demos● Installing Singularity

Page 18: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

Singularity Demos● Building Singularity image (Recipe File)

Page 19: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

Singularity Demos● Building Singularity image

Page 20: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

Singularity Demos● MPI Hello World on Ibex

Page 21: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

Singularity Demos● MPI Hello World on Shaheen

Page 22: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

Singularity Demos● Tensorflow GPU on Ibex

Page 23: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

Singularity Demos● Web server in container

Page 24: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

Singularity Demos● Spark cluster inside

containers

Page 25: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

Singularity Demos● Spark cluster inside

containers

Page 26: Containers On HPC...Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. Same user inside and outside of the container Singularity

Thank You