Skip to content

Commit b05f110

Browse files
authored
Merge pull request #1471 from elezar/allow-cuda-compat-with-no-ldcache
Use enable-cuda-compat hook when ldcache does not exist
2 parents 0cdb30e + 5f25d95 commit b05f110

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

cmd/nvidia-cdi-hook/cudacompat/cudacompat.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,6 @@ func (m command) getContainerForwardCompatDir(containerRoot containerRoot, hostD
128128
m.logger.Debugf("No CUDA forward compatibility libraries directory in container")
129129
return "", nil
130130
}
131-
if !containerRoot.hasPath("/etc/ld.so.cache") {
132-
m.logger.Debugf("The container does not have an LDCache")
133-
return "", nil
134-
}
135131

136132
libs, err := containerRoot.globFiles(filepath.Join(cudaCompatPath, "libcuda.so.*.*"))
137133
if err != nil {

cmd/nvidia-cdi-hook/cudacompat/cudacompat_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ func TestCompatLibs(t *testing.T) {
4444
contents: map[string]string{
4545
"/usr/local/cuda/compat/libcuda.so.333.88.99": "",
4646
},
47-
hostDriverVersion: "222.55.66",
47+
hostDriverVersion: "222.55.66",
48+
expectedContainerForwardCompatDir: "/usr/local/cuda/compat",
4849
},
4950
{
5051
description: "compat lib is newer; ldcache",

0 commit comments

Comments
 (0)