Week 11 Self-Check — Workload Management + Troubleshooting (part 1)

Closed book. Target ≥ 15/18.

1. What username do you use for docker login nvcr.io, and what’s the password?

Answer Username is the literal string $oauthtoken (quote it in shells), password is your NGC API key. Same credentials for K8s: kubectl create secret docker-registry ngc-secret --docker-server=nvcr.io --docker-username='$oauthtoken' --docker-password=$NGC_API_KEY.

2. What guarantees does an NGC deep-learning framework container give you that a pip install doesn’t?

Answer A tested, pinned-compatible stack: CUDA toolkit, cuDNN, NCCL, and the framework built against each other, tuned and QA'd monthly (tags like 25.06-py3). Only external dependency is a new-enough host driver. Removes the CUDA/framework version-matrix problem.

3. A container built with CUDA 12.8 runs on a host with driver 550 (CUDA 12.4 era). Works or not, and why?

Answer Generally works for minor versions: CUDA minor-version compatibility lets 12.x runtimes run on any 12.x-capable driver (and forward-compat libs can bridge more). Rule of thumb the exam wants: host driver must be new enough for the CUDA *major* version; too-old driver → "CUDA driver version is insufficient for CUDA runtime version".

4. Write the SBATCH header for 2 nodes × 4 GPUs × 4 tasks per node, 2-hour limit, partition gpu.

Answer
#!/bin/bash
#SBATCH --partition=gpu
#SBATCH --nodes=2
#SBATCH --ntasks-per-node=4
#SBATCH --gres=gpu:4
#SBATCH --time=02:00:00
srun ./train.sh
(--gpus-per-node=4 is the equivalent newer syntax.)

5. --gres=gpu:2 vs --gpus=2 — difference?

Answer --gres=gpu:2 is per-node: 2 GPUs on each allocated node. --gpus=2 is a job-total GPU count that Slurm may spread across nodes. With one node they coincide; multi-node they don't.

6. How does a Slurm job’s process end up seeing only its allocated GPUs?

Answer Slurm (via gres/gpu + cgroup/task plugins) sets CUDA_VISIBLE_DEVICES for each step to the allocated device indices and, with cgroup enforcement (ConstrainDevices=yes), blocks the device files of other GPUs — so even a misbehaving app can't grab unallocated GPUs.

7. What are enroot and pyxis?

Answer NVIDIA's container path for Slurm: enroot is a rootless container runtime that turns Docker/NGC images into unprivileged sandboxes; pyxis is the Slurm SPANK plugin exposing it as srun --container-image=nvcr.io#nvidia/pytorch:25.06-py3. The standard way to run NGC containers under Slurm (BCM ships them).

8. Sketch the Triton model repository layout for an ONNX model “resnet” v1, and name the three ports.

Answer
model_repo/
  resnet/
    config.pbtxt
    1/
      model.onnx
Ports: 8000 HTTP/REST, 8001 gRPC, 8002 Prometheus metrics. Readiness: GET /v2/health/ready.

9. Minimal docker command to run a NIM, and what API does it expose?

Answer
docker login nvcr.io   # $oauthtoken / NGC key
docker run --rm --gpus all -e NGC_API_KEY \
  -p 8000:8000 nvcr.io/nim/meta/llama-3.1-8b-instruct:latest
Exposes an OpenAI-compatible API (/v1/chat/completions, /v1/models) on 8000. NIM picks an optimized engine profile (TensorRT-LLM/vLLM) for the detected GPU.

10. An admin must run 7 small inference services on one A100 with strong isolation; another team wants max throughput for many identical CUDA processes from one user. Pick sharing strategies.

Answer Isolation case: MIG — 7× 1g.5gb, hardware-isolated memory/SM/faults. Throughput-one-user case: MPS — concurrent kernels from multiple processes share the GPU without context-switch serialization (no fault isolation, fine within one trust domain). Time-slicing would serialize; fractions are Run:ai-managed sharing.

11. Where do DRA ResourceClaims fit vs the device plugin (cross-ref your demo repo)?

Answer Device plugin: opaque countable resource (nvidia.com/gpu: 2), no attribute selection. DRA (structured parameters, GA in K8s 1.34): DeviceClasses + ResourceClaims with CEL selectors ("A100 with ≥40GB", specific MIG profile), claims schedulable/shareable like PVCs. NVIDIA's DRA driver is the successor path to the device plugin for complex GPU/topology requests.

12. Pod error: “could not select device driver "" with capabilities: [[gpu]]” (or container can’t see GPU while host nvidia-smi works). Give your 4-step diagnostic sequence.

Answer (1) Runtime wiring: is runtimeClassName: nvidia set / is nvidia the default runtime in containerd config? (2) Toolkit: is nvidia-container-toolkit installed and configured (nvidia-ctk runtime configure, restart containerd)? (3) Device plugin: is the DaemonSet running and does kubectl describe node show nvidia.com/gpu capacity? (4) GPU Operator validators: kubectl get pods -n gpu-operator — a failing validator pinpoints the broken layer.

13. nvidia-smi prints “Failed to initialize NVML: Driver/library version mismatch”. Cause and fix?

Answer Userspace driver libraries were upgraded while the old kernel module is still loaded (driver update without reload). Fix: reboot, or unload/reload modules (rmmod nvidia_uvm nvidia_drm nvidia_modeset nvidia; modprobe nvidia) — reboot is the reliable answer. Verify versions: cat /proc/driver/nvidia/version vs installed libs.

14. On an 8-GPU HGX box, nvidia-smi looks healthy but every CUDA app fails at init with “system not yet initialized”. First thing you check?

Answer systemctl status nvidia-fabricmanager. On NVSwitch systems Fabric Manager must be running to program NVLink/NVSwitch routing before CUDA can initialize. Second check: FM package version exactly matches the driver version (mismatched FM refuses to start — see /var/log/fabricmanager.log).

15. When is Fabric Manager NOT required?

Answer On systems without NVSwitch: single-GPU nodes, PCIe-only multi-GPU servers, or NVLink-direct (non-switch) topologies. It's specifically the NVSwitch fabric supervisor for HGX/DGX baseboards.

16. A BCM compute node hangs forever in the node-installer stage. Name three things to check.

Answer (1) Provisioning network path: DHCP/PXE/TFTP from the head node reaching the node (right network, port security, cabling). (2) Node identification: MAC/category assignment correct in cmsh, image assigned. (3) Head-node side: CMDaemon logs (/var/log/cmdaemon, node-installer console via BMC) for disk layout or image sync errors.

17. What does imageupdate --dry-run (cmsh) tell you and why run it first?

Answer It previews the rsync between the software image and the live node — which files would be added/changed/deleted — without applying. Run it first because a sync can clobber files changed on the node outside the image (or reveal you forgot exclude lists for stateful paths).

18. Your KAI/TrainJob demo submits a 4-pod PyTorch job but only 3 GPUs are free; what happens and which exam concept is this?

Answer Nothing schedules: gang scheduling (PodGroup minMember=4) is all-or-nothing, so all pods stay Pending until 4 GPUs are available — avoiding deadlocked partial allocations. Exam concept: gang scheduling in Run:ai/KAI (and Kubeflow TrainJob integration) under Workload Management/Administration.

This site uses Just the Docs, a documentation theme for Jekyll.