From 2957f964b43c2baf0817fe44e276f1c702d64a2b Mon Sep 17 00:00:00 2001 From: chubei Date: Tue, 23 Jul 2024 06:02:52 +0800 Subject: [PATCH] Set `NVIDIA_DRIVER_CAPABILITIES` to `all` when GPU is enabled --- pkg/drivers/kic/oci/oci.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/drivers/kic/oci/oci.go b/pkg/drivers/kic/oci/oci.go index 07dabd37edf3..3fcbe63b3251 100644 --- a/pkg/drivers/kic/oci/oci.go +++ b/pkg/drivers/kic/oci/oci.go @@ -191,7 +191,7 @@ func CreateContainerNode(p CreateParams) error { //nolint to suppress cyclomatic runArgs = append(runArgs, "--ip", p.IP) } if p.GPUs != "" { - runArgs = append(runArgs, "--gpus", "all") + runArgs = append(runArgs, "--gpus", "all", "--env", "NVIDIA_DRIVER_CAPABILITIES=all") } memcgSwap := hasMemorySwapCgroup()