A Tesla training image does not match the GPU driver on the host
The scenario
A Tesla training container starts on a rack, then the first GPU call fails. The image was built for a newer CUDA, the software layer that talks to the GPU, than the driver on this host supports. A teammate wants to rerun the container as privileged so it can load a driver from inside the image.
Model answer
What I'd say first:
The Tesla image and the host driver do not match, so the GPU call fails. I would not run privileged to load a driver from the container. I would place the job on a host whose driver matches the image.
How I'd work it:
- 1Stop the retries. Read the CUDA version the image expects and the driver version the host reports.
- 2Confirm the failure is the mismatch, and that a host with the matching driver can open the GPU with this same image.
- 3Move the job to the matching pool, or roll the image back to the CUDA this rack supports. Do not install a driver from inside the container.
- 4Tell the room the container started because the CPU part was fine. The GPU contract was not. Privileged mode is not the contract.
How I'd explain it:
The host driver and the image CUDA have to be a pair. A container that starts has only proved the process launched. A wrong answer is privileged mode, which hands the container the host and still does not create a tested pair.
How I'd prevent it:
Publish a matrix of image digest to driver version. Admission on the rack pool rejects an image outside that matrix. The image build records the CUDA it needs, and a privileged flag on a training container fails the pipeline.
The follow-up they'll ask
“Rerun the Tesla container as privileged so it can load its own driver?”
No. Privileged mode gives the container control of the host. It does not make an untested driver pair safe, and it is a bigger hole than a failed GPU call. Read the CUDA the image wants and the driver the host has, and put the job on a host where those agree. Keep the container unprivileged.
Common mistakes
- Use privileged mode to load a driver
- Retry the same mismatched pair
- Treat container start as a working GPU