KEMBAR78
Add support to docker runtime for OCI access to NVIDIA GPUs by aaron-nall · Pull Request #20959 · kubernetes/minikube · GitHub
Skip to content

Conversation

@aaron-nall
Copy link
Contributor

fixes #20597

Adds support for OCI interface to NVIDIA GPUS with a new valid --gpus option "nvidia.com".

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jun 22, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jun 22, 2025
@k8s-ci-robot k8s-ci-robot requested review from medyagh and prezha June 22, 2025 21:16
@k8s-ci-robot
Copy link
Contributor

Welcome @aaron-nall!

It looks like this is your first PR to kubernetes/minikube 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/minikube has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @aaron-nall. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jun 22, 2025
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@medyagh
Copy link
Member

medyagh commented Jun 23, 2025

@aaron-nall can you plz help me undrestand this PR more ? maybe a Before/After this PR ? what exactly is being enabled in this PR ? what couldn't have been done before it ?

and also I think if you do --gpus=all it will automatically enable the addon and not needed to specifiy it

@medyagh
Copy link
Member

medyagh commented Jun 30, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 30, 2025
@ComradeProgrammer
Copy link
Member

containers/podman#21156 I think it is related to this pr

@minikube-pr-bot

This comment has been minimized.

@aronahl
Copy link

aronahl commented Jul 2, 2025

@aaron-nall can you plz help me undrestand this PR more ? maybe a Before/After this PR ? what exactly is being enabled in this PR ? what couldn't have been done before it ?

and also I think if you do --gpus=all it will automatically enable the addon and not needed to specifiy it

If CDI Devices are enabled for dockerd, at least in the latest stable NixOS release, the --gpus=all flag has been replaced with --device=nvidia.com/gpu=all.

The dockerd feature is listed as experimental, but it seems to be the only way to access Nvidia GPUs in current NixOS docker installs.

@medyagh
Copy link
Member

medyagh commented Jul 2, 2025

@aaron-nall can you plz fix the unit test

"make test"

--- FAIL: TestValidateGPUs (0.00s)
start_test.go:830: validateGPUs(cat, docker, docker) = "The gpus flag must be passed a value of "nvidia", "nvidia.com", "amd" or "all""; want = "The gpus flag must be passed a value of "nvidia", "amd" or "all""
FAIL

@minikube-pr-bot

This comment has been minimized.

@medyagh
Copy link
Member

medyagh commented Jul 9, 2025

/retest-this-please

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 20959) |
+----------------+----------+---------------------+
| minikube start | 50.9s    | 50.5s               |
| enable ingress | 16.0s    | 14.9s               |
+----------------+----------+---------------------+

Times for minikube start: 50.1s 48.9s 50.4s 54.3s 50.9s
Times for minikube (PR 20959) start: 51.9s 50.7s 48.7s 52.7s 48.7s

Times for minikube ingress: 14.9s 19.5s 16.0s 14.9s 15.0s
Times for minikube (PR 20959) ingress: 14.9s 14.5s 15.0s 15.0s 15.0s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 20959) |
+----------------+----------+---------------------+
| minikube start | 23.4s    | 23.7s               |
| enable ingress | 12.3s    | 12.2s               |
+----------------+----------+---------------------+

Times for minikube start: 21.6s 22.4s 22.0s 25.3s 25.6s
Times for minikube (PR 20959) start: 22.6s 26.6s 23.1s 23.0s 23.0s

Times for minikube ingress: 12.2s 12.3s 12.2s 10.7s 13.8s
Times for minikube (PR 20959) ingress: 13.2s 12.7s 12.2s 12.7s 10.3s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 20959) |
+----------------+----------+---------------------+
| minikube start | 21.6s    | 21.8s               |
| enable ingress | 24.1s    | 26.1s               |
+----------------+----------+---------------------+

Times for minikube start: 21.5s 20.5s 21.8s 23.3s 20.8s
Times for minikube (PR 20959) start: 21.8s 21.7s 21.8s 21.2s 22.4s

Times for minikube ingress: 28.2s 23.3s 23.2s 22.7s 23.2s
Times for minikube (PR 20959) ingress: 22.7s 39.2s 22.7s 22.7s 23.3s

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aaron-nall, medyagh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 7, 2025
@medyagh
Copy link
Member

medyagh commented Aug 7, 2025

thank you @aaron-nall

@medyagh medyagh merged commit fc70407 into kubernetes:master Aug 7, 2025
24 of 34 checks passed
pavansaikrishna78 pushed a commit to pavansaikrishna78/minikube that referenced this pull request Aug 11, 2025
…es#20959)

* Add support for --device=nvidia.com/gpu=all

* Add "nvidia.com" to valid options for gpus flag in TestValidateGPUs.
pavansaikrishna78 pushed a commit to pavansaikrishna78/minikube that referenced this pull request Aug 18, 2025
…es#20959)

* Add support for --device=nvidia.com/gpu=all

* Add "nvidia.com" to valid options for gpus flag in TestValidateGPUs.
pavansaikrishna78 pushed a commit to pavansaikrishna78/minikube that referenced this pull request Sep 9, 2025
…es#20959)

* Add support for --device=nvidia.com/gpu=all

* Add "nvidia.com" to valid options for gpus flag in TestValidateGPUs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support option --device=nvidia.com/gpu=all for nixos

7 participants