-
Notifications
You must be signed in to change notification settings - Fork 539
Add libnvidia-nvvm70.so library to CDI spec #1876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,13 +81,18 @@ func (l *nvcdilib) NewDriverLibraryDiscoverer(version string) (discover.Discover | |
| if err != nil { | ||
| return nil, err | ||
| } | ||
| legacyNVVMLibraryMounts, err := l.getLegacyNVVMLibraryMounts() | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| explicitLibraryMounts, err := l.getExplicitDriverLibraryMounts() | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
|
|
||
| libraries := discover.Merge( | ||
| versionSuffixLibraryMounts, | ||
| legacyNVVMLibraryMounts, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I initially added
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @elezar in the commit message for 5a3dcbe you mention: Do you recall what use cases were affected by having the explicit driver libraries mounted by default? I am curious as to why this was made an opt-in to begin with. |
||
| explicitLibraryMounts, | ||
| ) | ||
|
|
||
|
|
@@ -183,6 +188,25 @@ func (l *nvcdilib) getExplicitDriverLibraryMounts() (discover.Discover, error) { | |
|
|
||
| } | ||
|
|
||
| func (l *nvcdilib) getLegacyNVVMLibraryMounts() (discover.Discover, error) { | ||
| legacyNVMMLibrary := []string{ | ||
| "libnvidia-nvvm70.so.*", | ||
| } | ||
|
|
||
| driverLibraryLocator, err := l.driver.DriverLibraryLocator() | ||
| if err != nil { | ||
| return nil, fmt.Errorf("failed to get driver library locator: %w", err) | ||
| } | ||
| mounts := discover.NewMounts( | ||
| l.logger, | ||
| driverLibraryLocator, | ||
| l.driver.Root, | ||
| legacyNVMMLibrary, | ||
| ) | ||
|
|
||
| return mounts, nil | ||
| } | ||
|
|
||
| func getUTSRelease() (string, error) { | ||
| utsname := &unix.Utsname{} | ||
| if err := unix.Uname(utsname); err != nil { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can you wrap the error here?