-
Notifications
You must be signed in to change notification settings - Fork 50
Migrate to nvcdi api #261
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?
Migrate to nvcdi api #261
Conversation
52b9a64 to
f9c0907
Compare
| // TODO: Instead of abusing CLI command we generate here, we should expose | ||
| // this API and use that instead. This would require refactoring in the | ||
| // toolkit. | ||
| cmd := devicenodes.NewCommand(log.StandardLogger()) |
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.
See #262 for a follow-up.
8154723 to
3feb86b
Compare
cmd/nvidia-mig-manager/main.go
Outdated
| } | ||
|
|
||
| return rcfg.Run() | ||
| return rcfg.Run(ctx) |
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.
we already ctx in the rcfg, err := reconfigure.New(ctx, clientset, migPartedBinary, opts) line. Can we access the context from the struct itself?
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. You're right. I can use the context member.
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.
Updated.
a1ee413 to
888a600
Compare
Signed-off-by: Evan Lezar <[email protected]>
This change switches from a direct invocation of the nvidia-ctk cdi generate command to using the nvcdi API. This matches what is done in the toolkit container to generate a CDI spec for management devices. Signed-off-by: Evan Lezar <[email protected]>
Signed-off-by: Evan Lezar <[email protected]>
Signed-off-by: Evan Lezar <[email protected]>
888a600 to
b29c4d2
Compare
Ideally we would also switch away from using the nvidia-ctk CLI to create device nodes as part of this PR too.