Skip to content

[Feature]: Vast.ai spot instances #4026

Description

@trashhalo

Vast.ai offers interruptible (spot) instances, but the vastai backend can only provision on-demand instances.

Vast provisions an interruptible instance when the PUT /asks/{id}/ payload includes a price (a per-machine bid in $/hour at or above the machine's min_bid); omitting it creates an on-demand instance. Discounts are real and machine-dependent — e.g. an RTX 4090 at ~$0.24/hr on-demand vs. ~$0.12/hr min_bid.

gpuhunt already emits Vast spot offers (each on-demand offer is duplicated with price set to min_bid and spot=True), so these offers reach dstack today. The backend currently drops them with an extra_filter (# TODO(egor-s): spots currently not supported) and never bids.

Interruption detection and retry are already backend-agnostic on the server side (a lost spot instance is terminated with INTERRUPTED_BY_NO_CAPACITY, mapped to the generic interruption retry event), so only the backend-side bid is missing — the same path RunPod (#1119), OCI (#1401), and Nebius (#2965) spot instances already use.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions