Commit 4a20ede
committed
feat(gpu): add WSL CDI spec watcher and set deviceIDStrategy to index
On WSL2 hosts the NVIDIA device plugin generates CDI specs that cannot
be used directly by k3s containerd since it includes a single device
name "all" and not one based on the index or UUID of the device.
Add a background watch_cdi_specs function to cluster-entrypoint.sh that:
- detects WSL2 via /dev/dxg presence
- handles specs already present at gateway restart
- uses inotifywait to watch for new/updated specs
- transforms the spec with jq (cdiVersion=0.5.0, devices[0].name="0")
Add inotify-tools and jq to the cluster image apt-get install block to
support the watcher.
Signed-off-by: Evan Lezar <elezar@nvidia.com>1 parent 6afe945 commit 4a20ede
File tree
3 files changed
+47
-0
lines changed- deploy
- docker
- kube/gpu-manifests
3 files changed
+47
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
| 233 | + | |
232 | 234 | | |
233 | 235 | | |
234 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
320 | 354 | | |
321 | 355 | | |
322 | 356 | | |
| |||
327 | 361 | | |
328 | 362 | | |
329 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
330 | 369 | | |
331 | 370 | | |
332 | 371 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
| |||
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| 36 | + | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
| |||
0 commit comments