Skip to content

Commit 64c9d25

Browse files
committed
ci(gpu): generate CDI spec before cluster bootstrap on WSL2
On WSL2 runners, no CDI spec exists by default. Add a step to generate /var/run/cdi/nvidia.yaml using nvidia-ctk from the already-pulled cluster image before the GPU cluster is bootstrapped. This ensures the NVIDIA device plugin can advertise GPU resources and CDI injection works correctly.
1 parent c39cad5 commit 64c9d25

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/e2e-gpu-test.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,16 @@ jobs:
6666
- name: Install Python dependencies and generate protobuf stubs
6767
run: uv sync --frozen && mise run --no-prepare python:proto
6868

69+
- name: Generate CDI spec (WSL2)
70+
if: matrix.name == 'wsl-amd64'
71+
run: |
72+
docker run --rm --privileged \
73+
-v /var/run/cdi:/var/run/cdi \
74+
-v /usr/lib/wsl:/usr/lib/wsl \
75+
--entrypoint nvidia-ctk \
76+
ghcr.io/nvidia/openshell/cluster:${{ inputs.image-tag }} \
77+
cdi generate --output=/var/run/cdi/nvidia.yaml
78+
6979
- name: Bootstrap GPU cluster
7080
env:
7181
GATEWAY_HOST: host.docker.internal

0 commit comments

Comments
 (0)