Skip to content

Commit

Permalink
Merge pull request #168 from klueska/create-cluster-with-cdi
Browse files Browse the repository at this point in the history
Use CDI to inject GPUs into the kind workers instead of 'legacy' mode
  • Loading branch information
klueska authored Sep 19, 2024
2 parents cb9d859 + 4fd9875 commit 1c4dfb0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
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

0 comments on commit 1c4dfb0

Please sign in to comment.