Skip to content

Apptainer Builder

This page provides an interface to build Apptainer (formerly Singularity) container image files (.sif) directly on the HPC cluster as a Slurm job. You can build images either from an Apptainer definition file or by converting a Docker image.

Similar to other job types, the form includes tabs like “New Job”, “Batch Script”, and “Setting”. This guide focuses on the “New Job” tab for building Apptainer images.

Configure the resources needed for the build process itself:

Apptainer Build - Job Options
  • Partition: Select a partition suitable for build jobs (e.g., hpc). Build processes can be resource-intensive.
  • CPUs per Task: Specify the number of CPU cores allocated for the build job (e.g., 1). More cores might speed up certain build steps.
  • Working Directory: The directory where the build process will occur and where the resulting .sif file will be saved by default (e.g., /home/root/Apptainer/Containers).

This section defines the source and output for your container build.

Choose one of the following methods:

  • Build from Docker Image:

    Apptainer Build - From Docker Image
    • SIF File Name: Enter the desired name for the output .sif file (e.g., my-container.sif).
    • Docker Image Path: Specify the Docker image to convert (e.g., docker://hello-world:latest). This uses the docker:// prefix.
  • Build from Definition File:

    Apptainer Build - From Definition File
    • SIF File Name: Enter the desired name for the output .sif file. * Definition File Path: Provide the path to the Apptainer definition file (.def) located on the cluster filesystem. Use the folder icon to browse or the plus icon potentially to create/edit.
  • Advanced Apptainer Build Options: Click the dropdown arrow to reveal advanced build arguments or options (e.g., --fakeroot, --sandbox, etc.).
  • Redirect to Job Monitor after submission: Check this to automatically go to the Job Monitoring page after submission.
  • Submit Button: Submits the Apptainer build job to the Slurm scheduler.

The build process can take some time depending on the complexity of the container. Check the job logs via the Job Logs page for progress and potential errors.