From bf6babe07e31458994e82e098e2026944602f6b3 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Mon, 13 Feb 2023 14:08:20 +0100 Subject: [PATCH] Fix issue with blank nvidia-ctk path Signed-off-by: Evan Lezar --- internal/discover/hooks.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/discover/hooks.go b/internal/discover/hooks.go index 708260e1..dfe98988 100644 --- a/internal/discover/hooks.go +++ b/internal/discover/hooks.go @@ -47,6 +47,9 @@ func FindNvidiaCTK(logger *logrus.Logger, nvidiaCTKPath string) string { return nvidiaCTKPath } + if nvidiaCTKPath == "" { + nvidiaCTKPath = nvidiaCTKExecutable + } logger.Debugf("Locating NVIDIA Container Toolkit CLI as %v", nvidiaCTKPath) lookup := lookup.NewExecutableLocator(logger, "") hookPath := nvidiaCTKDefaultFilePath