Overview

Singularity allows instantiating an alternative operating system environment on our Linux systems.

In other words:

And all this without significant overhead. Sounds like fiction? It's fact. Right now. Some caveats do apply though.

Credit: Singularity was and is being developed at Berkeley Lab. Please see http://singularity.lbl.gov for upstream information.

News

Invocation

There are several ways to instantiate a Singularity container and run software in it. The two most important ones are:

Availability

Singularity containers can be instantiated on any current user accessible Linux system at DESY Zeuthen. In particular, Singularity is available on all

The current set of standard images available in /project/singularity/images includes

These short image names are symbolic links to the current versions of the standard images for these operating systems. The specific images are being kept around for a few months, but not forever.

Note users can copy a current image to any location to make sure this exact version will remain available.

Also note users can bring their own images and thus don't have to rely on the ones provided by DV. Creating those is rather simple and documented upstream. It currently requires root access though, so cannot be done on supported Linux systems in Zeuthen. But have a look at https://singularity-hub.org .

Since Release 2.3, it's also possible to import docker images without root privileges. Note that the environment variable SINGULARITY_CACHEDIR is used to place downloaded image layers, and it defaults to ~/.singularity. Change the variable to something more sensible to avoid wasting a lot of home space.

Batch system support

In case you want to run your batch jobs directly under the standard images available in /project/singularity/images, it is possible via the qsub switch -l singularity_os=<os>, whereas <os> defines the image to be used. Example:

[wgs] ~ % qrsh -w n -l singularity_os=sl6 lsb_release -d
Description:    Scientific Linux release 6.9 (Carbon)
[wgs] ~ % qrsh -w n -l singularity_os=u18 lsb_release -d
Description:    Ubuntu 18.04 LTS

/!\ Note: The -w n switch is recommended for qsub/qrsh in this case to avoid the warning "warning: no suitable queues".

Filesystems shared between Host and Container

Subject to availability on the host:

Users can specify additional folders on the host to be bind mounted inside the container when the container is started. This shouldn't be required. But if it is, please see singularity help run for info how to do it - and let DV know why you need to do this.

CUDA support

To run CUDA code in singularity, the CUDA libraries must be available both inside and outside the container. Singularity can automatically bind the needed directories into the container like this:

singularity exec --nv -B /etc/OpenCL/vendors yourprogram

Caveats

Singularity (last edited 2018-09-04 15:35:17 by GötzWaschk)