![]() |
0.1.39
|
The Linux wheel is self-contained – pip install pyhelios3d needs no extra system packages. GPU ray tracing is the part that needs setup: OptiX requires driver libraries that the NVIDIA Container Toolkit injects only when explicitly asked, which it is not by default.
That failure is silent. A container without those libraries imports fine, runs fine, and uses a slower backend without reporting anything.
For host-level CUDA installation, see CUDA Setup Guide.
Then verify:
The Linux wheel bundles the OpenGL and X11 libraries the visualizer plugin needs, so no additional system packages are required – even on minimal images such as python:*-slim and nvidia/cuda:*.
NVIDIA_DRIVER_CAPABILITIES controls which host driver libraries the NVIDIA Container Toolkit injects into the container. When unset it defaults to utility,compute:
| Capability | Provides |
|---|---|
utility | nvidia-smi, NVML |
compute | CUDA |
graphics | OpenGL, EGL, Vulkan ICD, and OptiX |
display | X11 display support (also enables the graphics mounts) |
video | Video Codec SDK |
compat32 | 32-bit application support |
OptiX's driver library libnvoptix.so.1 is part of the graphics mount set. With the default capabilities you get a container where nvidia-smi works, CUDA works, and OptiX is silently unavailable — so the radiation model falls back to Vulkan.
Set the capability explicitly:
NVIDIA_DRIVER_CAPABILITIES=all also works.
Before debugging PyHelios, confirm the driver libraries actually reached the container:
Both libnvoptix.so.1 and libcuda.so.1 should be listed. If they are absent, the problem is with the container runtime configuration, not with PyHelios.
The radiation model probes backends in order — OptiX 8, then OptiX 6, then Vulkan — and falls back silently. Ask it directly:
"Vulkan Compute" on an NVIDIA system means OptiX was not available. Vulkan is a complete ray-tracing backend rather than a degraded mode — results are valid — but OptiX is typically faster on NVIDIA hardware.
PyHelios's native library does not link the CUDA runtime; it loads libcuda.so.1 and libnvoptix.so.1 from the driver at runtime. A CUDA base image is therefore convenient but not required — any Debian- or Ubuntu-based image works, provided the container runtime injects the driver libraries.
If you do use nvidia/cuda images, the runtime flavor is sufficient. The devel flavor adds compilers and headers that a pre-built wheel never uses.
Note: NVIDIA deletes end-of-life CUDA image tags from Docker Hub, so a pinned tag will not remain available indefinitely. Mirror images you depend on long-term.
The nvidia/cudagl and nvidia/opengl images are no longer maintained (frozen at CUDA 11.x); install the graphics libraries into a current image instead.
Baking NVIDIA_DRIVER_CAPABILITIES into the image means users only need --gpus all. Run it with:
GPU access in a container requires all of:
Configuration is not automatic after installing the toolkit package:
--gpus all is Docker CLI syntax that dispatches to the NVIDIA runtime; it does not work without the toolkit installed.
OptiX 8 additionally requires driver >= 560. OptiX 6.5 covers older drivers. If neither is usable, the Vulkan backend is used.
| Symptom | Cause | Fix |
|---|---|---|
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]] | Container Toolkit not installed, nvidia-ctk runtime configure not run, or Docker not restarted | Run the configure and restart commands above |
nvidia-smi works, but getBackendName() reports Vulkan | NVIDIA_DRIVER_CAPABILITIES lacks graphics | Add graphics to the capability list |
libnvoptix.so.1 absent from ldconfig -p despite graphics being set | Container Toolkit older than v1.15.0 (Apr 2024), which added injection of an OptiX support file | Upgrade the toolkit; check with nvidia-ctk --version |
Failed to initialize NVML: Unknown Error | cgroup driver interaction | See NVIDIA's troubleshooting guide |
| Vulkan backend selected on a machine with no NVIDIA GPU | Expected behavior | None needed; Vulkan is a supported backend |
If you are targeting the Vulkan backend rather than OptiX, note that the toolkit injects the NVIDIA Vulkan ICD but not the Vulkan loader itself — install libvulkan1 in the image. The injected ICD is written to /etc/vulkan/icd.d/; the standard loader searches both that and /usr/share/vulkan/icd.d/, but software that hardcodes the latter will not find it.
If a Mesa software driver (mesa-vulkan-drivers, providing lavapipe) is also installed, it can be enumerated alongside the NVIDIA device. Should Vulkan appear to run on the CPU, check which devices are present with vulkaninfo from vulkan-tools.
no-cgroups setting it requires is system-wide and affects rootful containers on the same host.--security-opt=label=disable.