nvidia-container-toolkit/internal/modifier
Carlos Eduardo Arango Gutierrez b4f0ad9c8e
BUGFIX: modifier: respect GPU volume-mount device requests
The gated modifiers used to add support for GDS, Mofed, and CUDA Forward Comatibility only check the NVIDIA_VISIBLE_DEVICES envvar to determine whether GPUs are requested and modifications should be made. This means that use cases where volume mounts are used to request devices (e.g. when using the GPU Device Plugin) are not supported.

This patch takes visibleDevicesFromEnvVar private, making VisibleDevices the only exported method to query valid devices.
And edits the gated modifiers to use this func, ensuring device requests
via mounts are also taken into acount.

Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
2025-06-05 15:49:50 +02:00
..
cdi run goimports -local against the entire codebase 2023-12-01 11:13:17 +01:00
cdi_test.go BUGFIX: modifier: respect GPU volume-mount device requests 2025-06-05 15:49:50 +02:00
cdi.go BUGFIX: modifier: respect GPU volume-mount device requests 2025-06-05 15:49:50 +02:00
csv_test.go [no-relnote] Remove duplicate test case 2025-02-05 19:01:43 +01:00
csv.go BUGFIX: modifier: respect GPU volume-mount device requests 2025-06-05 15:49:50 +02:00
discover_test.go run goimports -local against the entire codebase 2023-12-01 11:13:17 +01:00
discover.go run goimports -local against the entire codebase 2023-12-01 11:13:17 +01:00
gated.go BUGFIX: modifier: respect GPU volume-mount device requests 2025-06-05 15:49:50 +02:00
graphics_test.go run goimports -local against the entire codebase 2023-12-01 11:13:17 +01:00
graphics.go BUGFIX: modifier: respect GPU volume-mount device requests 2025-06-05 15:49:50 +02:00
hook_remover_test.go Move cmd/nvidia-container-runtime/modifier package to internal/modifier 2022-07-01 14:28:40 +02:00
hook_remover.go Allow cdi mode to work with --gpus flag 2025-02-05 19:01:43 +01:00
list.go [no-relnote] Refactor oci spec modifier list 2025-01-22 13:58:31 +01:00
stable_test.go run goimports -local against the entire codebase 2023-12-01 11:13:17 +01:00
stable.go run goimports -local against the entire codebase 2023-12-01 11:13:17 +01:00