apptainer

Provides expert guidance for building, running, and administering Apptainer containers on HPC systems.

Updated Aug 11, 2026
One-click install
npx skills add https://github.com/t-jet/pal_found_cli --skill apptainer-t-jet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: apptainer
Source: https://github.com/t-jet/pal_found_cli/tree/main/.ept/skills/apptainer
Command: npx skills add https://github.com/t-jet/pal_found_cli --skill apptainer-t-jet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Working with Apptainer containers on HPC clusters involves many specialized concepts—SIF images, definition files, GPU and MPI integration, bind mounts, overlays, fakeroot, and security configuration—that are hard to get right without deep documentation knowledge. ## Core Features & Use Cases - Container Build Guidance: Covers all apptainer build workflows including Docker/OCI sources, definition files, sandboxes, and encrypted images. - HPC Runtime Patterns: Explains GPU workloads (--nv, --rocm), MPI parallel jobs, Slurm batch integration, bind mounts, and persistent overlays. - Administration Reference: Details apptainer.conf, user namespaces, fakeroot setup, security policy, and Singularity migration. - Use Case: A researcher needs to run a TensorFlow training job with GPU support on a Slurm cluster; the skill provides the correct apptainer exec --nv --bind command and explains image signing and caching. ## Quick Start Ask how to build a SIF image from a Docker Hub container and run it with GPU support on your cluster.

Frequently Asked Questions about apptainer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build an Apptainer container from a Docker image?

Run `apptainer build myimage.sif docker://ubuntu:22.04` to pull Docker Hub layers and assemble them into a compressed, read-only SIF file. You can also use a definition file with `Bootstrap: docker` for customized builds.

How do I run GPU workloads in an Apptainer container?

Use the `--nv` flag to expose NVIDIA CUDA libraries and devices, or `--rocm` for AMD GPUs. For example, `apptainer exec --nv tensorflow.sif python train.py` runs GPU-accelerated code using the host driver.

Is Apptainer compatible with Singularity images and commands?

Yes, Apptainer is the direct successor to Singularity and maintains SIF image format compatibility. It also honors `SINGULARITY_` and `SINGULARITYENV_` environment variables, so most existing Singularity workflows continue to work.

How do I make an Apptainer container writable?

Build a sandbox with `apptainer build --sandbox mydir/ docker://ubuntu` and modify it using `apptainer shell --writable --fakeroot mydir/`. For SIF images, add a persistent ext3 overlay or use `--writable-tmpfs` for temporary changes.

Why does my Apptainer build fail as a non-root user?

Unprivileged builds rely on user namespaces and fakeroot, which require `/etc/subuid` and `/etc/subgid` entries configured by an administrator. Some bootstrap agents like yum/dnf also have limitations under fakeroot mode.

How do I bind host directories into an Apptainer container?

Use the `--bind` flag, e.g. `apptainer exec --bind /data:/mnt myimage.sif cmd`, or set the `APPTAINER_BINDPATH` environment variable. Home directory, `/tmp`, and current working directory are bound by default.