Testing the SIF on a CPU login node
Login nodes frequently lack GPUs or matching driver devices. Always validate --nv or --rocm bindings inside an interactive GPU allocation.
Operator task guide
A GPU container that works under Docker on a workstation often fails on an HPC cluster because Singularity and Apptainer require explicit host driver bind flags (--nv for NVIDIA or --rocm for AMD), preserve or strip environment variables differently under --contain and --cleanenv, and inherit small default /dev/shm limits from the host or scheduler.
Verify host-to-container driver binding, visible device variables, shared memory sizing, and Slurm srun rank launch inside an interactive allocation before rewriting application code. When external remote build endpoints are unavailable or deprecated, use local unprivileged or --fakeroot builds with verified base images.
Reviewed . Reference guidance is not a diagnosis of your workload.
First confirm the host scheduler actually allocated a GPU and that the container runtime binds the host kernel-matched user-space driver libraries. A mismatched or missing --nv or --rocm flag leaves PyTorch unable to locate libcuda.so.1 or libamdhip64.so even when the base image contains CUDA or ROCm toolkits.
nvidia-smi
apptainer exec --nv image.sif nvidia-smi
apptainer exec --nv image.sif ldconfig -p | grep -E 'libcuda|libnvidia-ml'
apptainer exec --nv image.sif python3 -c "import torch; print(torch.cuda.is_available(), torch.cuda.device_count())"Strict isolation flags such as --cleanenv or --containall can drop CUDA_VISIBLE_DEVICES, ROCR_VISIBLE_DEVICES, NCCL transport settings, and SLURM_* variables needed by distributed launchers. Inspect the exact environment seen by a rank inside the container rather than assuming login-shell exports carry over.
srun --ntasks=2 --gpus-per-task=1 apptainer exec --nv image.sif env | grep -E 'CUDA|ROCR|HIP|SLURM|NCCL|RCCL|OMPI'
# Forward explicit variables when --cleanenv is required:
APPTAINERENV_NCCL_DEBUG=INFO apptainer exec --nv --cleanenv image.sif python3 -c "import os; print(os.environ.get('CUDA_VISIBLE_DEVICES'))"Multi-GPU PyTorch DataLoader workers and NCCL shared-memory transports fail with Bus error or shm allocation failures when /dev/shm is capped or read-only inside the container. Measure available /dev/shm from inside the running container and bind a scratch directory if the image needs temporary runtime space.
apptainer exec --nv image.sif df -h /dev/shm
apptainer exec --nv --bind "$TMPDIR:/tmp" image.sif python3 -c "import torch.multiprocessing as mp; print(mp.get_sharing_strategy())"Legacy Singularity workflows that call retired external remote builders fail at DNS resolution or authentication before a container ever runs. Pull OCI images directly via docker:// into a local SIF or build locally with --fakeroot on clusters that enable user namespaces, keeping the definition file pinned to exact digests.
apptainer pull pytorch_24.sif docker://nvcr.io/nvidia/pytorch:24.07-py3
apptainer build --fakeroot custom_gpu.sif custom.def| Signal | What it means | Next action |
|---|---|---|
| torch.cuda.is_available() is False inside container | Host driver libraries were not bound or CUDA_VISIBLE_DEVICES was stripped or masked. | Re-test with explicit --nv (or --rocm), verify host nvidia-smi inside the same Slurm job, and inspect --cleanenv variable forwarding. |
| cudaErrorInsufficientDriver or symbol lookup error | Container CUDA runtime or compatibility layer disagrees with the host NVIDIA kernel driver. | Compare host driver version against the container CUDA version and remove conflicting user-site LD_LIBRARY_PATH entries. |
| Bus error or NCCL shared-memory allocation failure | Container /dev/shm is exhausted by PyTorch DataLoader workers or NCCL SHM segments. | Check df -h /dev/shm inside the container, reduce num_workers or set NCCL_SHM_DISABLE only as a controlled diagnostic step. |
| Remote build endpoint or unprivileged build failure | The definition or script targets a retired external remote builder or lacks user-namespace privileges. | Switch to local docker:// pulls or cluster-supported --fakeroot / build-node workflows and record the exact SIF digest. |
Login nodes frequently lack GPUs or matching driver devices. Always validate --nv or --rocm bindings inside an interactive GPU allocation.
Injecting host toolkit libraries over container libraries causes ABI and symbol collisions. Clear unintended host paths with --cleanenv and forward only required runtime variables.
A container can have plenty of GPU HBM and host RAM while still crashing with SIGBUS because /dev/shm is capped to a small fraction of node memory.
Check container runtime toolkit and host driver alignment steps.
Estimate PyTorch worker shared memory needs before launching multi-GPU jobs.
Match NVIDIA driver versions with CUDA toolkits and PyTorch builds.
Parse container, NCCL, and CUDA crash traces locally in your browser with zero upload.
Singularity and Apptainer do not mount host NVIDIA driver libraries or device nodes automatically. You must pass --nv (or --rocm for AMD GPUs) and run inside a job allocation where devices are exposed.
Never install kernel drivers inside the container image. Always rely on --nv so the runtime binds user-space driver libraries from the host that match the host Linux kernel module.
Prefix variables with APPTAINERENV_ (or SINGULARITYENV_) on the host, or pass --env NCCL_DEBUG=INFO directly on the exec command so they survive --cleanenv isolation.
Get the likely cause, supporting evidence, and next safe steps with the same cloud reasoning used by paid plans. A crash the engine recognizes is answered in seconds, then checked by an independent AI review that updates this page when it finishes. A crash it does not recognize waits for the AI's own answer, which can take a few minutes. No account, card, or installation. Logs are masked at Denpex API ingress and are not saved to account history.
Before uploading, review cloud data handling and local options.
Upload your log file. Large files are processed in your browser. Only selected evidence is submitted when you run diagnosis.
No credit card. No automatic subscription. See whether Denpex helps with an incident you already understand.
Up to 50 diagnoses a day for 30 days. Verify your work email to activate an eligible company evaluation, then replay a resolved incident and compare the evidence and next steps with your team's confirmed cause.
Use the three free diagnoses to review your error and relevant evidence. Keep reference guidance separate from the cause and recovery status of your own workload.
Diagnose your incident