Using Singularity

Singularity is a program that enables to build containers for HPC systems. In contrast to Docker, user does not need to be root to use Singularity containers or images. rrot user is only needed when building the [singlauraty} image.

1. Testing Singularity

  • pull an image

  • run the image

singularity pull docker://godlovedc/lolcow
singularity run lolcow_latest.sif

2. Basic usage

Running a shell:
singularity shell image.sif
Executing a program:
singularity exec image.sif program
List apps defined in an image:
singularity  inspect —list-apps image.sif
singularity exec image.sif ls /scif/apps
Running an app:
singularity run --app appname image.sif [options]

3. Running parallel jobs in Singularity

singularity exec image.sif mpirun -np n ...
  • On SMP machine

mpirun -np n singularity exec image.sif ...