Skip to content

Commit 926ac77

Browse files
author
Evan Lezar
committed
Merge branch 'fix-cdi-spec-generation-on-debian' into 'main'
Resolve all symlinks when finding libraries in LDCache See merge request nvidia/container-toolkit/container-toolkit!370
2 parents f99e863 + fc7c8f7 commit 926ac77

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Update `update-ldcache` hook to only update ldcache if it exists.
66
* Update `update-ldcache` hook to create `/etc/ld.so.conf.d` folder if it doesn't exist.
77
* Fix failure when libcuda cannot be located during XOrg library discovery.
8+
* Fix CDI spec generation on systems that use `/etc/alternatives` (e.g. Debian)
89

910
## v1.13.0
1011

internal/ldcache/ldcache.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,7 @@ func (c *ldcache) resolve(target string) (string, error) {
307307
link = filepath.Join(filepath.Dir(target), link)
308308
}
309309

310-
// Ensure that the returned path is relative to the root.
311-
link = filepath.Join(c.root, link)
312-
313-
c.logger.Debugf("Resolved link: '%v' => '%v'", name, link)
314-
return link, nil
310+
return c.resolve(link)
315311
}
316312

317313
// bytesToString converts a byte slice to a string.

internal/lookup/cuda/cuda.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ func (l *cudaLocator) Locate(pattern string) ([]string, error) {
9494
"/usr/lib64",
9595
"/usr/lib/x86_64-linux-gnu",
9696
"/usr/lib/aarch64-linux-gnu",
97+
"/usr/lib/x86_64-linux-gnu/nvidia/current",
98+
"/usr/lib/aarch64-linux-gnu/nvidia/current",
9799
),
98100
lookup.WithCount(1),
99101
)

0 commit comments

Comments
 (0)