Centos 8

BootStrap: yum OSVersion: 7 # Error: 404 Not Found MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/BaseOS/$basearch/os/ Include: dnf

Centos 7

BootStrap: yum OSVersion: 7 # Error: 404 Not Found MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/os/$basearch/ Include: yum

Creating writable –sandbox directories

If you wanted to create a container within a writable directory (called a sandbox) you can do so with the –sandbox option. It’s possible to create a sandbox without root privileges, but to ensure proper file permissions it is recommended to do so as root.

$ sudo singularity build –sandbox lolcow/ library://sylabs-jms/testing/lolcow

The resulting directory operates just like a container in a SIF file. To make changes within the container, use the –writable flag when you invoke your container. It’s a good idea to do this as root to ensure you have permission to access the files and directories that you want to change.

$ sudo singularity shell –writable lolcow/

List what apps are available:

hpc$ singularity apps centos7.sif

Just run the fortune app:

hpc$ singularity run --app fortune centos7.sif
What sin has not been committed in the name of efficiency?

hpc$ singularity exec centos7.sif echo 'Hi' | cowsay

hpc$ singularity exec centos7.sif cat /etc/os-release

fortune not found This is in epel on Centos 7

$ sudo singularity build –sandbox centos7 centos7.def $ sudo singularity shell –writable centos7

install epel-release

This is custom footer