...
Alternativ ist es möglich den Container mittels eines Remote Builders in der Sylabs Cloud zu bauen. Hierfür wird ein entsprechender Account benötigt.
Download pre-built image
Container außerhalb des Clusters erstellen
...
Nachstehend sind einige grundlegende Schritte für das Erstellen eines ContainersEs gibt jede Menge fertige Images, welche später angepasst werden können.
Codeblock |
---|
language | text |
---|
theme | Midnight |
---|
title | Beispiel: Ubuntu 20.04 Image herunterladen und einen Container daraus erstellen |
---|
|
student@mine:~/containers$ singularity pull ubuntu.sif library://ubuntu:20.04 |
...
Codeblock |
---|
language | text |
---|
theme | Midnight |
---|
title | Beispiel: Ubuntu 20.04 Image herunterladen und einen Container daraus erstellen | Container lokal erkunden |
---|
|
# Start the #Check the operating system of the host, you should see CentOS
head /etc/os-release
#Start the container, and enter the shell
singularity shell ./ubuntu.sif
#Now# Now check the operating system of the container, you would see Ubuntu
head /etc/os-release
#List the root directory of the container, can you tell which are from the host?
which are from the container?
ls -l /
#List the home directory in the Container, you should see a single user which is
you.
ls -l /home
#your user id inside container
whoami
#exit the container
exit# your user id inside container
whoami
# exit the container
exit |
Codeblock |
---|
language | text |
---|
theme | Midnight |
---|
title | Convert the ubuntu.sif file into a Singularity sandbox |
---|
|
singularity build --fakeroot --sandbox myubuntu ./ubuntu.sif |
Codeblock |
---|
language | text |
---|
theme | Midnight |
---|
title | Start the sandbox as container with a writable shell and install nano |
---|
|
singularity shell --fakeroot --writable myubuntu
apt update
apt upgrade
apt install nano
exit |
Codeblock |
---|
language | text |
---|
theme | Midnight |
---|
title | Convert the sandbox into a Singularity image file |
---|
|
singularity build --fakeroot myubuntu.sif myubuntu/ |
Codeblock |
---|
language | text |
---|
theme | Midnight |
---|
title | Create an image from a def file |
---|
|
Bootstrap: docker
From: ubuntu:18.04
%post
apt-get update -y
apt-get -y install libpmem1 librpmem1 libpmemblk1 libpmemlog1 libpmemobj1 libpmempool1
apt-get -y install libpmem-dev librpmem-dev libpmemblk-dev libpmemlog-dev libpmemobj-dev libpmempool-dev libpmempool-dev
apt-get -y install build-essential libmemkind-dev libvmem-dev nano git |
Container im Clusters nutzen
...
Nachdem der Container gebaut und auf das Cluster übertragen wurde , kann er ist er auf allen Knoten verfügbar und kann mit den folgenden Befehlen gestartet werden.
...