Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
User Manual

User Manual
Results will update as you type.
  • Application Guide
  • Status of System
  • Usage Guide
  • Compute partitions
  • Software
    • AI Frameworks and Tools
    • Bring your own license
    • Chemistry
    • Data Manipulation
    • Engineering
    • Environment Modules
    • Miscellaneous
    • Numerics
    • Virtualization
      • Singularity/Apptainer
    • Devtools Compiler Debugger
    • Visualisation Tools
  • FAQ
  • NHR Community
  • Contact

    You‘re viewing this with anonymous access, so some content might be blocked.
    /
    Singularity/Apptainer

    Singularity/Apptainer

    Feb. 28, 2024

    enables users to have full control of their environment

    Description

    Singularity is a free, cross-platform and open-source computer program that performs operating-system-level virtualization also known as containerization. One of the main uses of Singularity is to bring containers and reproducibility to scientific computing and the high-performance computing (HPC) world.

    The need for reproducibility requires the ability to use containers to move applications from system to system.

    Using Singularity containers, developers can work in reproducible environments of their choosing and design, and these complete environments can easily be copied and executed on other platforms.

    You can find the documentations on the Singularity docs page

    VersionInstallation Pathmodulefile
    3.2.1/opt/singularity/3.2.1singularity/3.2.1
    3.10.3/sw/tools/singularity/3.10.3singularity/3.10.3
    3.10.3/sw/tools/singularity/el8/3.10.3singularity/3.10.3-rocky

    Prerequisites

    No group membership or license is needed. Singularity can be used by all HLRN users by default.

    Modules

    Selecting the version and loading the environment

    Load the modulefile

    $ module lad singularity/3.2.1


    This provides access to the binary singularity wich can be used to run containers.

    Bash completion

    By default bash completion for singularity is not loaded. To enjoy bash completion with Singularity commands and options, source the bash completion file as stated below:

    source $SING_AUTOC

    After loading singularity module, environment variable SING_AUTOC contains the necessary bash completion file.

    Building images and running containers

    Building images for Singularity requires root privileges. Therefore you need to prepare the image locally on your computer and then move the image into HLRN.

    Or you can use Singularity or Docker hubs to run images located there. For more information please use:

    singularity run --help

    Example Jobscripts

    Here is an example job of running the local Singularity image (.sif)

    #!/bin/bash
    #SBATCH -p medium
    #SBATCH -N 1
    #SBATCH -t 60:00
    
    module load singularity
    
    singularity run /sw/tools/singularity/lolcow.sif
    
    Binding directories
    
    Sometimes it is required to have some specific paths in container, which are not mounted by default. For instance, /scratch/tmp is a default TMPDIR in the host system and is not available by default within the container, which might cause problems with software that needs it. You can either edit the environment variable or bind the /scratch as shown below:
    
    singularity {run|exec|shell} --bind /scratch /path/to/singularity.sif

    Cluster Specifics

    A100

    GPU A100 partition#Container - for NHR@ZIB GPUs

    /wiki/spaces/PUB/pages/428683 - for NHR@Göttingen GPUs



    , multiple selections available, Use left or right arrow keys to navigate selected items
    software
    hlrn-sw
    sw-misc
    {"serverDuration": 11, "requestCorrelationId": "a1aceef3dcae4bd18bb87bfd8b4b3520"}