From 89781ad6a3e5bd9095d41a9a94562a7f62760d61 Mon Sep 17 00:00:00 2001 From: Evan Lezar <7723350-elezar@users.noreply.gitlab.com> Date: Mon, 22 May 2023 13:02:33 +0000 Subject: [PATCH] Merge branch 'use-major-minor-for-cuda-version' into 'main' Use *.* pattern when locating libcuda.so See merge request nvidia/container-toolkit/container-toolkit!397 --- CHANGELOG.md | 1 + internal/discover/graphics.go | 2 +- pkg/nvcdi/management.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53224ea1..5186292b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Generate CDI specification files with `644` permissions to allow rootless applications (e.g. podman). * Fix bug causing incorrect nvidia-smi symlink to be created on WSL2 systems with multiple driver roots. +* Fix bug when using driver versions that do not include a patch component in their version number. * [toolkit-container] Allow same envars for all runtime configs diff --git a/internal/discover/graphics.go b/internal/discover/graphics.go index dedbfbe7..1f3fd915 100644 --- a/internal/discover/graphics.go +++ b/internal/discover/graphics.go @@ -271,7 +271,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) }