Skip to content

Commit 0c4dd3d

Browse files
committed
Add cuda-compat hook to CDI spec generation
Signed-off-by: Evan Lezar <[email protected]>
1 parent 93cdac8 commit 0c4dd3d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

cmd/nvidia-ctk-installer/container/toolkit/toolkit_test.go

+7
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ containerEdits:
8080
- libcuda.so.1::/lib/x86_64-linux-gnu/libcuda.so
8181
hookName: createContainer
8282
path: {{ .toolkitRoot }}/nvidia-cdi-hook
83+
- args:
84+
- nvidia-cdi-hook
85+
- cuda-compat
86+
- --driver-version
87+
- 999.88.77
88+
hookName: createContainer
89+
path: {{ .toolkitRoot }}/nvidia-cdi-hook
8390
- args:
8491
- nvidia-cdi-hook
8592
- update-ldcache

pkg/nvcdi/driver-nvml.go

+3
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ func NewDriverLibraryDiscoverer(logger logger.Interface, driver *root.Driver, nv
9797
libraryPaths,
9898
)
9999

100+
// TODO: The following should use the version directly.
101+
compatLibHookDiscoverer := discover.NewCUDACompatLibsDiscoverer(logger, nvidiaCDIHookPath, driver)
100102
updateLDCache, _ := discover.NewLDCacheUpdateHook(logger, libraries, nvidiaCDIHookPath, ldconfigPath)
101103

102104
d := discover.Merge(
@@ -105,6 +107,7 @@ func NewDriverLibraryDiscoverer(logger logger.Interface, driver *root.Driver, nv
105107
version,
106108
nvidiaCDIHookPath,
107109
),
110+
compatLibHookDiscoverer,
108111
updateLDCache,
109112
)
110113

0 commit comments

Comments
 (0)