Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Buildah tool can build OCI container images directly on Eiger and Piz Daint. Buildah can only run in rootless mode on the systems: rootless mode relies on on Linux user namespaces, which are enabled on the compute nodes. Please refer to the official Buildah documentation for more information on the tool.The  The command buildah on Eiger is available directly on /usr/bin, while on Piz Daint you need to load the module Buildah as shown below, after you have accessed a compute node:

...

...

module load daint-gpu  # or daint-mc for multicore nodes
module load Buildah

Limitations

The gpfs and lustre file systems cannot store the image layers: In order to circumvent this problem, an ext4 partition is mounted on the compute node allocated using the contbuild

...

Code Block
languagebash
themeRDark
srun -A <account> -C mc --pty bash   # or "-C gpu" to access a GPU node on Piz Daint   

By default only one node is requested, since building container images is not supported with multiple nodes. On Piz Daint, you need to load the default module Buildah:

...

languagebash
themeRDark

...

Then it is pretty straightforward to build an image from a Dockerfile using the following commands:

...

Interacting with container registries using Buildah for pulling or pushing container images is straightforward. Buildah uses a registries.conf configuration file which controls the interaction with container registries as well as a policy.json defining the trust policy for container images. Default registries.conf and policy.json files are provided on Piz Daint allowing to allow interaction with DockerHub. Custom configuration files can always be used via the --registries-conf and --signature-policy command line options.

...

For instance, in order to login interactively on your personal DockerHub registry where you are registered with <username>, you should run the command below: 

Code Block
languagebash
themeRDark
buildah login docker.io/<username> 

...