Troubleshooting CUDA Driver Initialization Failures
At startup, NIM validates that the CUDA driver can initialize using torch.cuda.init(). If this check fails, startup fails with a RuntimeError:
Common error messages include:
- “Error 803: system has unsupported display driver / cuda driver combination” — The container is loading a bundled CUDA compat driver that does not match the host’s kernel driver. This is the most common cause.
- “Error 802: system not yet initialized” — The NVIDIA kernel driver is not loaded or fabric manager is not running (required on NVSwitch systems like DGX A100/H100).
For known issues in the current release, refer to Release Notes.
Cause
The NIM container image ships CUDA compat libraries at /usr/local/cuda-*/compat/. At runtime, the NVIDIA Container Toolkit should bind-mount the host’s userspace CUDA driver into the container, overriding the bundled compat libraries. If this mechanism fails, the container loads the bundled compat driver, which may not match the host’s kernel driver.
Common reasons the host driver is not mounted:
- NVIDIA Container Toolkit is not installed or not configured
- The container runtime is not set to
nvidia(--runtime=nvidiaor equivalent) - CDI mode is enabled but not properly configured
- The
LD_LIBRARY_PATHinside the container prioritizes compat libraries over the host driver
Resolution
To resolve CUDA driver initialization failures, complete the following steps:
-
Verify the NVIDIA Container Toolkit is installed and configured:
-
Run the container with the NVIDIA runtime:
-
Check which
libcuda.sois loaded inside the container:The path should point to the host driver (for example,
/usr/lib/x86_64-linux-gnu/libcuda.so.1), not to/usr/local/cuda-*/compat/. -
Optional: For Error 802 on NVSwitch systems, confirm
nvidia-fabricmanageris running and its version matches the driver:
Related Topics
The following pages provide related startup and driver context:
- Architecture for container startup and health probes
- Troubleshooting GPU Memory Out-of-Memory Errors for GPU out-of-memory errors that can appear after a successful driver init
- NVIDIA Container Toolkit documentation