Singularity: Difference between revisions

From RCSWiki
Jump to navigation Jump to search
(Created page with "Singularity is a software that enables execution of containers as a job on a cluster. = Running a Container = TODO = Adding Packages to a Docker Image = * Build a "Sandbox"...")
 
m (added categories)
Line 14: Line 14:
* Now you can use the container image in a job (replacing <your computation> with the program inside the container that you want to run):
* 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>
  singularity run centoswithemacs.simg <your computation>
[[Category:Guides]]
[[Category:Software]]

Revision as of 17:15, 29 July 2020

Singularity is a software that enables execution of containers as a job on a cluster.

Running a Container

TODO

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>