Singularity: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Lleung moved page Using Singularity to Singularity) |
(No difference)
|
Revision as of 22:40, 4 February 2021
Singularity lets users run applications and jobs inside a Linux container. This allows for applications that were built to run on a different distribution of Linux or have specific software dependencies that are not compatible with our cluster systems to run. Applications from the Singularity Hub or Docker Hub can run without needing to install anything.
Usage
Singularity is available on on ARC as a loadable module. To get started, load the Singularity module:
module load singularity
Singularity can be used interactively. If you wish to enter a specific environment provided by a container, such as Ubuntu:
singularity shell docker://ubuntu
Adding Packages to a Docker Image
- Build a "Sandbox" of the dockerhub image -- we'll use the docker centos:7.6.1810 image as an example:
singularity build --sandbox /tmp/centos/ docker://centos:7.6.1810
- Modify the image -- add the emacs editor into the image:
- Note the "-f" which means to use fakeroot which gives root privilege inside the conainer (so you can use yum install)
singularity run -f -w /tmp/centos/ yum -y install emacs
- Package up the sandbox into a singularity 1 file image:
singularity build -f centoswithemacs.simg /tmp/centos/
- Now you can use the container image in a job (replacing <your computation> with the program inside the container that you want to run):
singularity run centoswithemacs.simg <your computation>