diff --git a/docs/GPU.md b/docs/GPU.md index 975af95..1e08064 100644 --- a/docs/GPU.md +++ b/docs/GPU.md @@ -148,7 +148,7 @@ The NVIDIA GPU Operator does not work on WSL2 as of version v24.3.0 (see [issue] To get around this issue, the recommended course of action is to install UDS K3d without the `cuda` flavor, and then deploy the NVIDIA Device Plugin separately. Below are the steps for doing so: -1. Run `uds run default` or `uds zarf package deploy oci://justinthelaw/uds-k3d:${VERSION} --confirm` +1. Run `uds run default --set K3D_EXTRA_ARGS="--gpus=all"` or `uds zarf package deploy oci://justinthelaw/uds-k3d:${VERSION} --confirm --set K3D_EXTRA_ARGS="--gpus=all"` 2. Create an `nvidia-device-plugin.yaml` manifest like the one below, and a deploy it with `uds zarf tools kubectl apply -f nvidia-device-plugin.yaml` ```yaml diff --git a/zarf.yaml b/zarf.yaml index 0cd4c9e..d9cb542 100644 --- a/zarf.yaml +++ b/zarf.yaml @@ -56,7 +56,7 @@ components: setVariables: - name: K3D_IMAGE - - name: enable-cuda + - name: inject-cuda-image required: true only: flavor: cuda @@ -69,6 +69,19 @@ components: setVariables: - name: K3D_IMAGE + - name: expose-gpus + required: true + only: + flavor: cuda + description: "Adds the extra K3d argument for exposing host GPUs to the cluster" + actions: + onDeploy: + before: + - cmd: | + echo "${ZARF_VAR_K3D_EXTRA_ARGS} --gpus=all" + setVariables: + - name: K3D_EXTRA_ARGS + - name: create-cluster required: true description: "Create the k3d cluster"