Show Menu
Cheatography

Sarus Cheat Sheet (DRAFT) by

Linux Containers on HPC environments

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Basic Commands

help
List commands and options
version
Print sarus semantic version
--debug
Make commands output debug logs
--verbose
Make commands output info logs
Sarus is driven by its sarus.json config­uration file, typically located at
/opt/s­aru­s/<­ver­sio­n-n­umb­er>­/et­c/s­aru­s.json.

Images

images
sarus images
List local images
pull
sarus pull python:alpine
Pull image from DockerHub
load
sarus load ./debian.tar my_debian
Loads tarball as image
rmi
sarus rmi centos:7
Deletes image

Runtime

run
sarus run alpine cat /etc/os-release
--tty
Allocate a pseudo-TTY in the container
--entr­ypoint echo hi
Overwrite the default ENTRYPOINT of the image
--mount=type=bind,
src=HD,dst=CD
Mount custom host direct­ories HD into the container at CD
--mpi
Enable MPI support
--ssh
Enable SSH in the container
--centralized-repository
Use centra­lized repository instead of the local one
You need to pull the image before you can run the container.
 

Useful Links

Other

ssh-keygen
Generate SSH keys locally to be used later with
sarus run --ssh ...
More info about SSH hook here.

Examples on Localhost

GPU nbody
sarus run ethcscs/cudasamples:9.2 /usr/local/cuda/samples/bin/x86_64/linux/release/nbody -benchmark -fp64 -numbodies=2000
OSU Micro
sarus run --mpi ethcscs/mvapich:ub1804_cuda92_mpi22_osu /usr/local/libexec/osu-micro-benchmarks/mpi/pt2pt/osu_latency
These require GPU and MPI libraries respec­tively installed on the host, and sarus.json correctly configured.

Examples on HPC

GPU nbody
srun -C gpu -N1 -t1 sarus run 
ethcscs/cudasamples:9.2
/usr/local/cuda/samples/bin/x86_64/linux/release/nbody -benchmark -fp64 -numbodies=200000
MC all2all
srun -C gpu -N2 -t2 sarus run --mpi 
ethcscs/osu-mb:5.3.2-mpich3.1.4 ./osu_latency
Find more examples in the Sarus Cookbook.