Use Apptainer¶
Overview¶
Provisioned Slurm nodes receive
/etc/containers/registries.conf.d/apptainer_mirror.conf. The file defines the
OIM Pulp registry as a mirror for supported upstream registries, including
Docker Hub, GHCR, Quay, registry.k8s.io, NVCR, ECR Public, and GCR.
An ordinary apptainer pull docker://... therefore uses the system registry
configuration. The shared benchmark helper is different: it rewrites every
entry to the OIM Pulp endpoint and never falls back to the internet.
Prerequisites¶
- Provision a Slurm functional layer whose catalog includes the
apptainerRPM. - To pull synchronized content from Pulp, complete Repository Manager and confirm
that
repo_status.ymlreportsoverall_status: success. - Select output and temporary directories with enough free space. Use shared storage for images needed by multiple nodes; the temporary directory may be local or shared.
- For the
/hpc_toolsexamples, configureslurm_cluster.nfs_storage_name. Optionally setvast_storage_nameto select a separate VAST mount; when it is omitted or empty, Orchestrator uses thenfs_storage_nameentry for/hpc_tools. - Run the
/hpc_toolswrite operations asroot, or have an administrator grant the calling user write access to the chosen shared directories.
Procedure¶
Pull through the configured registry mirror¶
-
Verify Apptainer and the generated mirror configuration:
Run on: Slurm nodeapptainer --version cat /etc/containers/registries.conf.d/apptainer_mirror.conf -
Create shared image and temporary directories:
Run on: Slurm nodemkdir -p /hpc_tools/container_images /hpc_tools/apptainer_tmp -
Pull an image by its normal upstream name:
Run on: Slurm nodeapptainer pull --disable-cache \ --name ubuntu_22.04.sif \ --dir /hpc_tools/container_images \ --tmpdir /hpc_tools/apptainer_tmp \ docker://docker.io/library/ubuntu:22.04Apptainer consults the generated registry configuration and tries the Pulp mirror. Because the configuration also retains each upstream registry as its primary location, an ordinary pull can reach the upstream registry when the mirror does not satisfy it and the node has external network access.
Require the Pulp copy¶
Specify Pulp explicitly when the operation must not use an upstream registry. Pulp stores the image path without the original registry prefix:
apptainer pull --disable-cache \
--name ubuntu_22.04.sif \
--dir /hpc_tools/container_images \
--tmpdir /hpc_tools/apptainer_tmp \
docker://<oim-admin-ip>:<pulp-port>/library/ubuntu:22.04
The image and tag must already be synchronized. Use the OIM admin address and Pulp container-registry port recorded by Repository Manager.
Pull the catalog-selected benchmark images¶
Slurm provisioning writes
/hpc_tools/scripts/download_container_image.sh and
/hpc_tools/scripts/container_image.list. The generated list contains
nvcr.io/nvidia/hpc-benchmarks:25.09 by default.
/hpc_tools/scripts/download_container_image.sh
The helper is Pulp-only, uses the OIM admin address on port 2225, stores SIF
files under /hpc_tools/container_images, and uses the same directory for
temporary data. It imposes a 30-minute timeout per image. Run it as root
because it writes /var/log/container_image_download.log and
/var/log/apptainer_pull.log.
Verification¶
ls -lh /hpc_tools/container_images/ubuntu_22.04.sif
apptainer inspect /hpc_tools/container_images/ubuntu_22.04.sif
apptainer exec /hpc_tools/container_images/ubuntu_22.04.sif \
cat /etc/os-release
Next steps¶
- Run HPC benchmarks with the generated Pulp-only helper.
- Configure catalog content and add packages to synchronize another image before requiring a Pulp-only pull.
Troubleshooting¶
apptaineris not found: Confirm that the applicable catalog functional layer includesapptainer, then rerun Repository Manager, Image Build Manager, and Orchestrator provisioning.- An explicit Pulp pull fails: Confirm the exact repository path and tag in Pulp. The Pulp path omits the original registry host.
- The helper fails but an ordinary pull works: The helper has no internet
fallback. Synchronize the image into Pulp and confirm that the OIM registry
is reachable on port
2225. The generated helper currently hard-codes that port; use a manual explicit Pulp pull if Repository Manager uses another port. - A direct registry pull fails: Confirm network and DNS connectivity from the compute node and verify that the requested registry is reachable.
- A pull runs out of space: Choose a larger
--tmpdir. For the supplied helper, free space under/hpc_tools/container_imagesor edit a local copy of the script to use another temporary directory.