Containers
Singularity is a widely used open-source container system. It is designed to run applications with bare metal performance while being somewhat secure, portable and repeatable. With Singularity containers, users can work in reproducible environments of their choice and design. The main advantage of using a container is that it establishes a self-contained software environment for each application, which simplifies the installation of complex applications.
Available containers
The AMD Infinity Hub contains a collection of software for AMD GPUs. The Infinity Hub images have been made available in this directory Adastra /opt/software/containers/images/infinity-hub/
.
Additionally, if the user whishes to uses custom containers, he can contact svp@cines.fr. We will place the containers in /opt/software/containers/images/users/<project_identifier>/<container_name>.sif
.
Using a container
The singularity binary dedicated to image execution is accessible on all Adastra compute nodes but not on the login nodes.
Running as a SLURM batch job
Here is an example of a SLURM script to launch the LAMMPS application :
#!/bin/bash
#SBATCH --account=<account_to_charge>
#SBATCH --job-name="<job_name>"
#SBATCH --constraint=MI250
#SBATCH --nodes=1
#SBATCH --exclusive
#SBATCH --time=1:00:00
singularity run --writable-tmpfs -B</path/to/input> -B/sys -B/dev -B/proc -B/lus /opt/software/containers/images/<container>.sif <executable> <arguments>
- Where :
--writable-tmpfs
makes the file system accessible as read-write with non persistent data (with overlay support only);-B, --bind strings
binds a path. Wherestrings
has the formatsrc[:dest[:opts]]
, wheresrc
anddest
are outside and inside paths. Ifdest
is not given, it is set equal tosrc
. Mount options (opts
) may be specified asro
(read-only) orrw
(read/write, which is the default). Multiple bind paths can be given by a comma separated list.
Running as a SLURM interactive session
We start by allocating a whole node (note the --exclusive
):
$ salloc --account=<account_to_charge> --constraint=GENOA --job-name="interactive" --nodes=1 --time=1:00:00 --exclusive
Get the name of the node with squeue
and the NODELIST
column:
$ squeue --me
Connect to the node:
$ ssh <node_hostname>
Then, repeat what was specified in the script above:
$ singularity run --writable-tmpfs -B</path/to/input> -B/sys -B/dev -B/proc -B/lus /opt/software/containers/images/<container>.sif <executable> <arguments>
You can run a shell in the container using the following command:
$ singularity shell --writable-tmpfs -B</path/to/input> -B/sys -B/dev -B/proc -B/lus /opt/software/containers/images/<container>.sif