Skip to content

Show host GPU driver on fleet instances - #4032

Open
peterschmidt85 wants to merge 1 commit into
masterfrom
instance-gpu-driver
Open

Show host GPU driver on fleet instances#4032
peterschmidt85 wants to merge 1 commit into
masterfrom
instance-gpu-driver

Conversation

@peterschmidt85

@peterschmidt85 peterschmidt85 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Problem

When dstack provisions instances, the accelerator driver installed on the host (NVIDIA/AMD/Tenstorrent) is not visible anywhere — anyone listing fleet instances cannot tell which driver a host runs, short of provisioning it and running a task there.

Solution

Detect the driver on the host and show it on fleet instances. When it cannot be detected, the field stays None.

  • dstack-shim detects the driver version once at startup, inside the existing GPU detection: an extra driver_version column in the nvidia-smi query, --driver added to the existing amd-smi static call (with a fallback retry if amd-smi rejects the option), and /sys/module/tenstorrent/version for Tenstorrent.
  • New GET /api/instance/info endpoint reports facts observed by shim, as opposed to /api/components, which reports software managed by shim. The handler reads only the GPU list cached at startup, so it is constant-time.
  • The server stores the driver as JobProvisioningData.gpu_driver (GpuDriverInfo {vendor, version}, no DB migration). GPU hosts are asked on every instance check, as the reported facts change when shim restarts — required after a driver upgrade, and not necessarily observed by the server. The provisioning data is only updated if the driver changed, which also fills it for instances provisioned before the upgrade.
  • Surfaced as Instance.gpu_driver in the API and a DRIVER column in dstack fleet -v.
  • All new fields are optional, and the endpoint is version-gated like /api/instance/health, so old/new server, CLI, and shim combinations degrade to None.
  • Container-based backends stay None for now; kubernetes and vastai computes carry TODOs with implementation notes. Intel is intentionally not detected.

🤖 Generated with Claude Code

@peterschmidt85
peterschmidt85 requested a review from un-def July 15, 2026 11:34
@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 14 days with no activity.

Currently, the only way to know which GPU driver a fleet instance runs is to
provision it and run a task there.

Now shim detects the host GPU driver version on start (`nvidia-smi` for NVIDIA,
`amd-smi` for AMD, `/sys/module/tenstorrent/version` for Tenstorrent) and reports
it via the new `GET /api/instance/info` endpoint. The server stores it in
`JobProvisioningData`, so that no migration is needed, and exposes it as
`Instance.gpu_driver` and as a DRIVER column in `dstack fleet -v`.

Notes:

- Instance info reports facts observed by shim, as opposed to `/api/components`,
  which reports software managed by shim.
- GPU hosts are asked on every instance check, as the facts change when shim
  restarts, e.g., after a driver upgrade, which the server does not necessarily
  observe. The provisioning data is only updated if the driver changed. This also
  fills the driver for instances provisioned before the server upgrade.
- The driver stays unknown on hosts without GPUs, if detection fails, and on
  backends where shim does not run (runpod, vastai, kubernetes).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@peterschmidt85
peterschmidt85 marked this pull request as ready for review July 30, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant