Jump to navigation Jump to search

Singularity is a containerization technology much like Docker but with key differences that make it much more appealing in a shared HPC environment. In Docker, the Docker engine/daemon and its processes run under escalated privileges. Whatever runs in a Docker container is completely trusted but in a shared computing environment, we can imagine some security & stability issues that would result if users ran whatever they wanted. Singularity has more fine-tuned permissions and configurations that allow any user to simply call Singularity and create, edit, run, and delete their own containers. Singularity is also capable of running both Singularity container image and Docker container images.

Installation Method

I've installed Singularity on nfs-soft with the following method:

cd ~/devel/
cd singularity-2.5.2
./configure --prefix=/mnt/nfs/soft/singularity
make install
mv /mnt/nfs/soft/singularity/ /export/soft/

Running Singularity

Note that running Singularity containers will mean singularity images will be downloaded to the location where the command was run.

[bwong1@band ~]$ ls
Desktop  Documents  Downloads Music  Pictures  Public  Templates  Videos
[bwong1@band ~]$ /mnt/nfs/soft/singularity/bin/singularity run shub://GodloveD/lolcow
Progress |===================================| 100.0% 
/ You attempt things that you do not even \
\ plan because of your extreme stupidity. /
       \   ^__^
        \  (oo)\_______
           (__)\       )\/\
               ||----w |
               ||     ||
[bwong1@band ~]$ ls
Desktop  Documents  Downloads GodloveD-lolcow-master-latest.simg  Music  Pictures  Public  Templates Videos

It is a better idea to create a container named 'lxc' or 'singularity' and to run singularity commands while in there.

External Links