From 9624098a4e3668b828b8236c7de68ac497571cc3 Mon Sep 17 00:00:00 2001 From: Vitor Savian Date: Thu, 26 Sep 2024 13:12:45 -0300 Subject: [PATCH] Add user path to runtimes search Signed-off-by: Vitor Savian --- pkg/agent/containerd/config_linux.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/agent/containerd/config_linux.go b/pkg/agent/containerd/config_linux.go index 9808949dd3..d2c0301dd6 100644 --- a/pkg/agent/containerd/config_linux.go +++ b/pkg/agent/containerd/config_linux.go @@ -24,7 +24,7 @@ import ( const ( socketPrefix = "unix://" - runtimesPath = "/usr/local/nvidia/toolkit:/opt/kwasm/bin:/usr/sbin:/usr/local/sbin:/usr/bin:/usr/local/bin" + runtimesPath = "/usr/local/nvidia/toolkit:/opt/kwasm/bin" ) func getContainerdArgs(cfg *config.Node) []string { @@ -55,10 +55,10 @@ func SetupContainerdConfig(cfg *config.Node) error { cfg.AgentConfig.Systemd = !isRunningInUserNS && controllers["cpuset"] && os.Getenv("INVOCATION_ID") != "" } - // set the path to include the runtimes and then remove the aditional path entries + // set the path to include the default runtimes and remove the aditional path entries // that we added after finding the runtimes originalPath := os.Getenv("PATH") - os.Setenv("PATH", runtimesPath) + os.Setenv("PATH", runtimesPath+string(os.PathListSeparator)+originalPath) extraRuntimes := findContainerRuntimes() os.Setenv("PATH", originalPath)