Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

Description

Apptainer/Singularity is an application containerization solution for High-Performance Computing (HPC). The goal of Apptainer is to allow for "mobility of computing": an application containerized on one Linux system should be able to run on another system, as it is, and without the need to reconcile software dependencies and Linux version differences between the source and target systems.

More information

- Homepage: https://apptainer.org

Available Versions of Apptainer

Version

Module

Available on

1.1.9-GCCcore-11.3.0

tools/Apptainer/1.1.9-GCCcore-11.3.0

Noctua 2

This table is generated automatically. If you need other versions please click pc2-support@uni-paderborn.de.

Usage Hints for Apptainer

If you need support in using this software or example job scripts please click pc2-support@uni-paderborn.de.

To use Apptainer, load the module

module load tools Apptainer

for the most recent version or, for example

module load tools/Apptainer/1.1.9-GCCcore-11.3.0

for a specific version.

Apptainer and Singularity

Here we would like to disentangle the naming confusing about Singularity and Apptainer, see also Singularity history on Wikipedia:

  • Singularity was the name of the original research project started at Lawrence Berkeley National in 2015

  • SingularityCE: open-source Singularity supported by Sylabs

  • Apptainer: open-source Singularity hosted by the Linux Foundation

How do Apptainer and SingularityCE compare

  • they are compatible and practically the same

  • same command line arguments, same environment variables

  • containers created with one of them can be used with the other without any conversion

  • practically, you can replace singularity in the commands in Singularity-Introduction with apptainer after loading the Apptainer-module

  • Apptainer comes with a symbolic link to singularity, i.e. after loading the Apptainer module, you can use your singularity commands as usual

Apptainer and SingularityCE at PC2:

  • SingularityCE is installed in setuid mode at PC2

    • this makes it independent of user namespaces

  • Apptainer is installed in user-name space mode at PC2

    • this allows for additional functionality, like building containers directly on the HPC system

Creating Containers directly on the HPC System

As Apptainer is configured to use user namespaces on PC2 systems, you can create containers directly on the frontends of the HPC systems, e.g. with a recipe like

From: ubuntu:22.04

%post
    mkdir /pc2
    apt-get -y update
    apt-get -y install htop vim 

%environment
    export LC_ALL=C

%runscript
    echo "hello from container"

%labels
    Author blub

and the command

apptainer build ubuntu.sif ubuntu.recipe

Please be aware that you should set the environment variables for the cache and tmp-dir as explained in https://upb-pc2.atlassian.net/wiki/spaces/PC2DOK/pages/1900673/Singularity-Introduction#Ensuring-Enough-Storage-Space .

  • No labels