From 48414e97bbf7dac29beeb9ccd439db92dd6ee907 Mon Sep 17 00:00:00 2001 From: Christopher Desiniotis Date: Fri, 10 Mar 2023 13:11:29 -0800 Subject: [PATCH] Return empty list of devices for unprivileged containers when 'accept-nvidia-visible-devices-envvar-unprivileged=false' Signed-off-by: Christopher Desiniotis --- internal/modifier/cdi.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/modifier/cdi.go b/internal/modifier/cdi.go index 2fcd8eaa..a5f42eb8 100644 --- a/internal/modifier/cdi.go +++ b/internal/modifier/cdi.go @@ -104,7 +104,7 @@ func getDevicesFromSpec(logger *logrus.Logger, ociSpec oci.Spec, cfg *config.Con logger.Warningf("Ignoring devices specified in NVIDIA_VISIBLE_DEVICES: %v", devices) - return devices, nil + return nil, nil } // Modify loads the CDI registry and injects the specified CDI devices into the OCI runtime specification.