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
This commit is contained in:
Evan Lezar 2023-05-22 13:02:33 +00:00 committed by Evan Lezar
parent f677245d60
commit 89781ad6a3
3 changed files with 3 additions and 2 deletions

View File

@ -4,6 +4,7 @@
* Generate CDI specification files with `644` permissions to allow rootless applications (e.g. podman). * 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 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 * [toolkit-container] Allow same envars for all runtime configs

View File

@ -271,7 +271,7 @@ func newXorgDiscoverer(logger *logrus.Logger, driverRoot string, nvidiaCTKPath s
libCudaPaths, err := cuda.New( libCudaPaths, err := cuda.New(
cuda.WithLogger(logger), cuda.WithLogger(logger),
cuda.WithDriverRoot(driverRoot), cuda.WithDriverRoot(driverRoot),
).Locate(".*.*.*") ).Locate(".*.*")
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to locate libcuda.so: %v", err) return nil, fmt.Errorf("failed to locate libcuda.so: %v", err)
} }

View File

@ -88,7 +88,7 @@ func (m *managementlib) getCudaVersion() (string, error) {
libCudaPaths, err := cuda.New( libCudaPaths, err := cuda.New(
cuda.WithLogger(m.logger), cuda.WithLogger(m.logger),
cuda.WithDriverRoot(m.driverRoot), cuda.WithDriverRoot(m.driverRoot),
).Locate(".*.*.*") ).Locate(".*.*")
if err != nil { if err != nil {
return "", fmt.Errorf("failed to locate libcuda.so: %v", err) return "", fmt.Errorf("failed to locate libcuda.so: %v", err)
} }