From 424b8c9d464414702a6fc6de18faac7e3013af25 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Mon, 22 May 2023 13:53:19 +0200 Subject: [PATCH] Use *.* pattern when locating libcuda.so This change ensures that libcuda.so can be located on systems where no patch version is specified in the driver version. Signed-off-by: Evan Lezar --- internal/discover/graphics.go | 2 +- pkg/nvcdi/management.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/discover/graphics.go b/internal/discover/graphics.go index 3b9c9600..0c515e53 100644 --- a/internal/discover/graphics.go +++ b/internal/discover/graphics.go @@ -269,7 +269,7 @@ func newXorgDiscoverer(logger *logrus.Logger, driverRoot string, nvidiaCTKPath s libCudaPaths, err := cuda.New( cuda.WithLogger(logger), cuda.WithDriverRoot(driverRoot), - ).Locate(".*.*.*") + ).Locate(".*.*") if err != nil { return nil, fmt.Errorf("failed to locate libcuda.so: %v", err) } diff --git a/pkg/nvcdi/management.go b/pkg/nvcdi/management.go index 6643c559..56272803 100644 --- a/pkg/nvcdi/management.go +++ b/pkg/nvcdi/management.go @@ -88,7 +88,7 @@ func (m *managementlib) getCudaVersion() (string, error) { libCudaPaths, err := cuda.New( cuda.WithLogger(m.logger), cuda.WithDriverRoot(m.driverRoot), - ).Locate(".*.*.*") + ).Locate(".*.*") if err != nil { return "", fmt.Errorf("failed to locate libcuda.so: %v", err) }