-
Notifications
You must be signed in to change notification settings - Fork 950
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
nvidia-gpu 2.0 make compatible for k8s #2434
Conversation
Signed-off-by: codejuan <xh@decbug.com>
Codecov Report
@@ Coverage Diff @@
## master #2434 +/- ##
=========================================
Coverage ? 68.88%
=========================================
Files ? 277
Lines ? 18221
Branches ? 0
=========================================
Hits ? 12552
Misses ? 4250
Partials ? 1419
|
4215eb2
to
9b18298
Compare
fullname := path.Join(installDir, nvidiaHookName) | ||
os.Remove(fullname) | ||
os.Create(fullname) | ||
os.Chmod(fullname, 0755) |
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.
How about adding defer os.Remove(fullname)
here? delete the test-nvidia-container-runtime-hook
after test finished
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.
Actually, there is defer function at line22.
Sometimes test was broken unexpected, we should delete the mock file at first.
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.
Sorry master Xiong, my fault
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.
Take it easy man 😁
) | ||
|
||
var ( | ||
nvidiaHookName = "nvidia-container-runtime-hook" |
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.
please add more description to this variable. Is this is local file when executing hook?
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.
Both nvidia-container-runtime-hook and nvidia-container-cli was packaged in pouch rpm.
@@ -0,0 +1,36 @@ | |||
# PouchContainer with GPU | |||
|
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.
Before the graph, I think we should add a general introduction of the usage of PouchContainer with GPU.
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.
done
c1ead44
to
70c2561
Compare
UT fails @CodeJuan
|
c54fb26
to
bbde654
Compare
Signed-off-by: codejuan <xh@decbug.com>
LGTM |
Ⅰ. Describe what this PR did
k8s-device-plugin uses environment variables to specify a GPU accelerated container, so we should support it.
In order to be compatible with k8s, pouchd should set nvidia prestart hook if nvidia environment variable was set by user.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
Ⅳ. Describe how to verify it
NVIDIA-SMI couldn't find libnvidia-ml.so library in your system. Please make sure that the NVIDIA Display Driver is properly installed and present in your system
, then add a link to libnvidia-ml.soⅤ. Special notes for reviews