-
Notifications
You must be signed in to change notification settings - Fork 379
Create .so symlinks for driver libraries in container #326
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
Conversation
e20826f
to
7b5f6b3
Compare
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.
Initial pass. I lost some steam near the end, but wanted to drop the comments I had for now.
cmd/nvidia-ctk/hook/create-dot-so-symlinks/create-dot-so-symlinks.go
Outdated
Show resolved
Hide resolved
cmd/nvidia-ctk/hook/create-dot-so-symlinks/create-dot-so-symlinks.go
Outdated
Show resolved
Hide resolved
cmd/nvidia-ctk/hook/create-dot-so-symlinks/create-dot-so-symlinks.go
Outdated
Show resolved
Hide resolved
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.
I think some of the issues were because this was out of date.
cmd/nvidia-ctk/hook/create-dot-so-symlinks/create-dot-so-symlinks.go
Outdated
Show resolved
Hide resolved
cmd/nvidia-ctk/hook/create-dot-so-symlinks/create-dot-so-symlinks.go
Outdated
Show resolved
Hide resolved
cmd/nvidia-ctk/hook/create-dot-so-symlinks/create-dot-so-symlinks.go
Outdated
Show resolved
Hide resolved
93753a9
to
020f598
Compare
No. This is not related to the CUDA Forward Compat libraries at all. This is about creating |
020f598
to
81a6b00
Compare
Pull Request Test Coverage Report for Build 16469131076Details
💛 - Coveralls |
81a6b00
to
3a1f96c
Compare
20abfcc
to
3fea29c
Compare
e205edd
to
bc7ed44
Compare
internal/discover/symlinks.go
Outdated
if soname == "" || soname == libraryName { | ||
return nil, 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.
Do we not still want the .so
link even if the SONAME is the same as the libraryName?
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.
Yes, I think you're right. We want the .so
link but not the soname link. I don't think this comes up in typical driver installations though, so we may want to skip this for now.
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.
That's fine then. We can always revisit this if anyone complains.
internal/discover/symlinks.go
Outdated
|
||
// Create the .so -> SONAME symlink | ||
soLink := getSoLink(soname) | ||
if soLink != "" && soLink != soname && soLink != libraryName { |
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.
I don't understand the need for all these special cases
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.
If we get ""
this means that soname
is not a .so.*
file which one could argue is unexpected since we do filter on driver libraries at the start of this function. The other cases make sure that we don't try to create a link that links to itself. I think these are unlikely to occur in our driver installations, but are there for completenes.
internal/discover/symlinks.go
Outdated
// Create the .so -> SONAME symlink | ||
if soLink := getSoLink(soname); soLink != "" && soLink != soname { | ||
s := Symlink{ | ||
target: soname, | ||
link: filepath.Join(libraryDir, soLink), | ||
} | ||
soSymlinks = append(soSymlinks, s.String()) | ||
} |
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.
I still think this could be a bit more readable (in terms of the conditional cases). Maybe just a comment on what the cases are / mean would be sufficient, e.g.:
// Create the .so -> SONAME symlink
// If soname does not have a '.so' extension or soname itself ends with '.so'
// we skip this (because we will have just created the same symlink above).
A couple of minor comments, otherwise LGTM |
87082a6
to
a560b8b
Compare
This change ensures that .so and SONAME symlinks are created for driver libraries in the container. Signed-off-by: Evan Lezar <[email protected]>
This change removes the create-soname-symlinks hook introduced in v1.18.0-rc.1. Instead we rely on explicitly creating the .so -> SONAME -> .so.RM_VERSION symlink chain through the create-symlink hook. Signed-off-by: Evan Lezar <[email protected]>
Signed-off-by: Evan Lezar <[email protected]>
Signed-off-by: Evan Lezar <[email protected]>
Signed-off-by: Evan Lezar <[email protected]>
Signed-off-by: Evan Lezar <[email protected]>
a560b8b
to
3a59233
Compare
Looking good. Thanks. |
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.
LGTM
This change explicitly creates .so and SONAME symlinks for injected driver libraries. This means that the
create-soname-symlinks
hook that was added in #947 is not longer required and is therefore removed.And:
showing that the .so and .so.1 entries are present in the ldcache.