Set explicit GPU defaults in ResourcesSpec and improve default GPU vendor selection#3573
Open
peterschmidt85 wants to merge 2 commits intomasterfrom
Open
Set explicit GPU defaults in ResourcesSpec and improve default GPU vendor selection#3573peterschmidt85 wants to merge 2 commits intomasterfrom
peterschmidt85 wants to merge 2 commits intomasterfrom
Conversation
…ments in resource pretty-printing
r4victor
reviewed
Feb 13, 2026
- Default to NVIDIA only if user has no image - Keep backward compatibility with old/new server/CLI - Make `dstack offer` consistent with `dstack apply` Co-authored-by: Cursor <cursoragent@cursor.com>
0..) in ResourcesSpec and minor improvements in resource pretty-printing
Contributor
Author
TODOsDocs updates:
Future scope (outside this PR):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Previously,
ResourcesSpec.gpudefaulted toNone, making GPU the only resource without an explicit default (CPU defaults to2.., memory to8GB.., disk to100GB..). This caused the GPU field to be hidden in the CLI plan output. Additionally, the NVIDIA vendor default was silently applied deep in the validation code regardless of whether the user set a custom image.Changes
ResourcesSpec.gpudefault toGPUSpec(count=0..)instead ofNone, aligning GPU with other resource defaultsnvidiaonly when using the default CUDA image (no customimageordocker). With a custom image, any vendor is allowedset_gpu_vendor_default()with full backward compatibility across old/new CLI and server combinationsBefore / After
Backward compatibility
Tested across all CLI/server combinations (new CLI 0.21-dev, old CLI 0.20.9, new server, old server on sky.dstack.ai). GCP backend used for tests (has both NVIDIA and TPU offers).
dstack apply
dstack offer
Key observations