A city permitting desk smoke-tests inference images on GPU hosts with Docker. How should the container access NVIDIA GPUs?
Select an answer to reveal the explanation.
Short Explanation
Think of --gpus like handing the container a hall pass to the GPUs—without it, the box starts but the cards stay invisible. Use the Docker GPU flags (or your CDI equivalent) for that permitting smoke test.
Full Explanation
For municipal Docker smoke tests on permitting GPU hosts, containers do not inherit host NVIDIA devices by accident. Correct practice is to launch with Docker GPU access flags such as --gpus (or the site CDI equivalent) so the NVIDIA Container Toolkit path exposes devices, libraries, and driver hooks inside the workload. That is how a city permitting desk proves an inference image can actually see GPUs before anyone trusts the image in a shared queue.
Running without GPU runtime flags fails by concept because host drivers alone keep devices on the host; the container may start and look healthy while nvidia-smi or CUDA inside reports nothing. Bind-mounting only /etc/passwd fails because passwd identity mounts do not grant /dev/nvidia* visibility or toolkit injection—authentication files are orthogonal to GPU device exposure. Disabling the NVIDIA Container Toolkit to “reduce complexity” fails because the toolkit (or CDI wiring) is the supported mechanism that makes Docker GPU access work; turning it off guarantees false-negative smoke tests for civic inference images.
Exam caveat: NCP-AII Domain 3 questions distinguish “driver installed on host” from “container runtime GPU access.” Candidates often assume host nvidia-smi success implies container visibility; the exam expects explicit --gpus/CDI configuration for Docker demonstrations.
Operational check for the permitting desk: on a non-production GPU host with toolkit configured, run docker run --rm --gpus all <municipal-inference-image> nvidia-smi (or the CDI-equivalent device request), confirm every expected GPU appears, then repeat a tiny CUDA sample. Document the exact flags in the municipal runbook so later smoke tests are repeatable.