UQ RCC HPC Documentation

High Performance Computing guides and policies for the University of Queensland.

View the Project on GitHub UQ-RCC/hpc-docs

The Apptainer Basics

TO BE COMPLETED

David Green 28/11/2024

What is a software container?

Software containers is a generic technology term. It provides a mechanism for different operating systems and software that are not available in the host operating system so they can be used safely on the HPC platform. Software containers can be built from a “recipe” or downloaded as pre-built images, often as a stack that is assembled on the fly.

The names Docker, Shifter, Singularity/Apptainer are like different “brands” that support software containers.

Why is some software provided this way on Bunya?

There are several reasons for supporting the use of software containers on Bunya:

What is apptainer

Bunya uses Apptainer. Apptainer was created when Singularity was rebranded when it joined the Linux Foundation. Currently, the version of Apptainer installed on Bunya is version 1.3.3-1.el8.

How is apptainer provided on Bunya

Gotchas

What storage can I access from within the container?

A software container can automatically access /home and /scratch/user.
This is because you will most often run the container as your default username and group.

What are the steps

Building a container on Bunya

Using apptainer - 7 basic container operations

  Operation Command
1a create a container image outright apptainer build myContainer.sif myContainer.def
1b pull a container image apptainer pull ...
2 create a sandbox apptainer build --sandbox myContainer.sandbox myContainer.def
3 update the sandbox apptainer shell --writable myContainer.sandbox
4 convert the sandbox to a standalone image apptainer build myContainer.sif myContainer.sandbox
5 start a shell interface in the container apptainer shell myContainer.sif
6 run the default action for the container apptainer run myContainer.sif
7 exec an arbitrary action using the container apptainer exec myContainer.sif someLinuxCommand

Sample Session


Example 

More Info

QCIF have notes on their training github (details to follow) For more info about apptainer consult the manual page and online resources.