Skip to content

feat(gpu): introduce GPU request spec#1156

Draft
elezar wants to merge 4 commits into
mainfrom
feat/gpu-request-spec
Draft

feat(gpu): introduce GPU request spec#1156
elezar wants to merge 4 commits into
mainfrom
feat/gpu-request-spec

Conversation

@elezar
Copy link
Copy Markdown
Member

@elezar elezar commented May 4, 2026

Summary

Replace GPU-specific sandbox request fields with PlacementRequirements / GPUSpec, and add optional GPU count placement requests while preserving the default GPU request shape.

Related Issue

None

Changes

  • Added PlacementRequirements with an embedded GPUSpec to public and driver protos.
  • Added optional GPUSpec.count, mutually exclusive with explicit device_id values.
  • Added openshell sandbox create --gpu-count, with CLI validation for count > 0 and --gpu-device conflicts.
  • Validated GPU count/device-ID mutual exclusion at the gateway and preserved count in driver request translation.
  • Honored GPU count in Kubernetes by setting nvidia.com/gpu to the requested count.
  • Kept VM support limited to one GPU, and rejected count requests for Docker and Podman until those drivers support count semantics.
  • Preserved image-name GPU auto-detection and --gpu as a present GPU request with no device IDs and no count.
  • Updated unit tests and user/architecture docs for the new placement behavior.

Testing

  • mise run pre-commit passes
  • cargo check -p openshell-core -p openshell-server -p openshell-driver-docker -p openshell-driver-kubernetes -p openshell-driver-podman -p openshell-driver-vm -p openshell-cli
  • cargo test -p openshell-cli gpu
  • cargo test -p openshell-server -p openshell-driver-docker -p openshell-driver-kubernetes -p openshell-driver-podman -p openshell-driver-vm -p openshell-core gpu --lib
  • Unit tests added/updated
  • E2E tests added/updated (not applicable; e2e coverage was already merged separately)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 4, 2026

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@elezar elezar force-pushed the feat/gpu-request-spec branch 2 times, most recently from 8b95e09 to 3d17c4e Compare May 13, 2026 16:00
elezar added 4 commits May 13, 2026 18:16
Signed-off-by: Evan Lezar <elezar@nvidia.com>
Signed-off-by: Evan Lezar <elezar@nvidia.com>
Signed-off-by: Evan Lezar <elezar@nvidia.com>
Signed-off-by: Evan Lezar <elezar@nvidia.com>
@elezar elezar force-pushed the feat/gpu-request-spec branch from 3d17c4e to 930c581 Compare May 13, 2026 16:44
@github-actions
Copy link
Copy Markdown

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