From a84474979114f6803e346e02541af016ea3d7e51 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Fri, 17 Feb 2023 11:11:18 +0200 Subject: [PATCH] Ensure that generate uses a consistent nvidia-ctk path Signed-off-by: Evan Lezar --- cmd/nvidia-ctk/cdi/generate/generate.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/nvidia-ctk/cdi/generate/generate.go b/cmd/nvidia-ctk/cdi/generate/generate.go index e84dad49..77165e71 100644 --- a/cmd/nvidia-ctk/cdi/generate/generate.go +++ b/cmd/nvidia-ctk/cdi/generate/generate.go @@ -23,6 +23,7 @@ import ( "path/filepath" "strings" + "github.com/NVIDIA/nvidia-container-toolkit/internal/discover" "github.com/NVIDIA/nvidia-container-toolkit/internal/edits" "github.com/NVIDIA/nvidia-container-toolkit/pkg/nvcdi" "github.com/container-orchestrated-devices/container-device-interface/pkg/cdi" @@ -122,6 +123,8 @@ func (m command) validateFlags(r *cli.Context, cfg *config) error { return err } + cfg.nvidiaCTKPath = discover.FindNvidiaCTK(m.logger, cfg.nvidiaCTKPath) + return nil }