The article is taken from https://github.com/NIH-HPC/Singularity-Tutorial. I’m personally learning much from the systematic rich contents and below are my learning points……
Downloading Singularity
https://github.com/sylabs/singularity
Popular Sites
There are popular sites for Singularity Download that has pre-build containers
- Singularity Hub (Stanford University and the Singularity community)
- Quay.io (RedHat)
- NGC (Nvidia)
- BioContainers (Bioconda group)
Downloading the Containers
% singularity pull library://godlovedc/funny/lolcow
INFO: Downloading library image
89.2MiB / 89.2MiB [========================================================================================================================================================] 100 % 5.4 MiB/s 0s
WARNING: integrity: signature not found for object group 1
WARNING: Skipping container verification
Singularity File
The Singularity File has a .sif extension something like this
lolcow_latest.sif
Entering the Shell of Singularity
% singularity shell lolcow_latest.sif
Singularity> cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.5 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
You will notice the container is running Ubuntu…… although the Host OS could be different
Interesting Observations
a. The user remains the same inside and outside of the container.
Singularity> whoami
admin
b. The hostname remains the same inside and outside the container
Singularity> hostname
node1
c. Running the application within the containers
Singularity> cowsay moo
_____
< moo >
-----
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
d. Exiting the Application
Singularity > exit
References: