Skip to content
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

Use CDI to inject GPUs into the kind workers instead of 'legacy' mode #168

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This DRA resource driver is currently under active development and not yet
designed for production use.
We will continually be force pushing over `main` until we have something more stable.
We may (at times) decide to push commits over `main` until we have something more stable.
Use at your own risk.

A document and demo of the DRA support for GPUs provided by this repo can be found below:
Expand Down Expand Up @@ -32,7 +32,7 @@ First since we'll launch kind with GPU support, ensure that the following prereq
Container Runtime to use volume mounts to select devices to inject into a
container.
``` console
sudo nvidia-ctk config --set accept-nvidia-visible-devices-as-volume-mounts=true --in-place
sudo nvidia-ctk config --in-place --set accept-nvidia-visible-devices-as-volume-mounts=true
```

1. Show the current set of GPUs on the machine:
Expand Down
4 changes: 0 additions & 4 deletions demo/clusters/kind/scripts/create-kind-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,3 @@ kind create cluster \
--name "${KIND_CLUSTER_NAME}" \
--image "${KIND_IMAGE}" \
--config "${KIND_CLUSTER_CONFIG_PATH}"

# Unmount the masked /proc/driver/nvidia to allow
# dynamically generated MIG devices to be discovered
docker exec -it "${KIND_CLUSTER_NAME}-worker" umount -R /proc/driver/nvidia
2 changes: 1 addition & 1 deletion demo/clusters/kind/scripts/kind-cluster-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ nodes:
# This requires `accept-nvidia-visible-devices-as-volume-mounts = true` be set
# in `/etc/nvidia-container-runtime/config.toml`
- hostPath: /dev/null
containerPath: /var/run/nvidia-container-devices/all
containerPath: /var/run/nvidia-container-devices/cdi/runtime.nvidia.com/gpu/all
# The generated CDI specification assumes that `nvidia-ctk` is available on a
# node -- specifically for the `nvidia-ctk hook` subcommand. As a workaround,
# we mount it from the host.
Expand Down