Skip to content

Commit

Permalink
Add cuda-compat hook to CDI spec generation
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Lezar <[email protected]>
  • Loading branch information
elezar committed Feb 7, 2025
1 parent 04c7567 commit 0b50458
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/nvidia-ctk-installer/container/toolkit/toolkit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ containerEdits:
- libcuda.so.1::/lib/x86_64-linux-gnu/libcuda.so
hookName: createContainer
path: {{ .toolkitRoot }}/nvidia-cdi-hook
- args:
- nvidia-cdi-hook
- cuda-compat
- --driver-version
- 999.88.77
hookName: createContainer
path: {{ .toolkitRoot }}/nvidia-cdi-hook
- args:
- nvidia-cdi-hook
- update-ldcache
Expand Down
3 changes: 3 additions & 0 deletions pkg/nvcdi/driver-nvml.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ func NewDriverLibraryDiscoverer(logger logger.Interface, driver *root.Driver, nv
libraryPaths,
)

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

d := discover.Merge(
Expand All @@ -105,6 +107,7 @@ func NewDriverLibraryDiscoverer(logger logger.Interface, driver *root.Driver, nv
version,
nvidiaCDIHookPath,
),
compatLibHookDiscoverer,
updateLDCache,
)

Expand Down

0 comments on commit 0b50458

Please sign in to comment.