From f7273794bbbde9709fc1416cfc57c578a9678f22 Mon Sep 17 00:00:00 2001 From: peterschmidt85 Date: Thu, 29 Jan 2026 09:38:32 +0100 Subject: [PATCH] [Docs] Added `Spot policy` --- docs/docs/concepts/fleets.md | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/docs/docs/concepts/fleets.md b/docs/docs/concepts/fleets.md index 4def21845..dad06cb80 100644 --- a/docs/docs/concepts/fleets.md +++ b/docs/docs/concepts/fleets.md @@ -281,12 +281,38 @@ Pre-provisioning is supported only for [VM-based backends](backends.md#vm-based) Backend fleets allow you to specify the resource requirements for the instances to be provisioned. The `resources` property syntax is the same as for [run configurations](dev-environments.md#resources). -> Not directly related, but in addition to `resources`, you can specify [`spot_policy`](../reference/dstack.yml/fleet.md#instance_types), [`instance_types`](../reference/dstack.yml/fleet.md#instance_types), [`max_price`](../reference/dstack.yml/fleet.md#max_price), [`region`](../reference/dstack.yml/fleet.md#max_price), and other [options](../reference/dstack.yml/fleet.md#). +### Spot policy - +Backend fleets allow you to specify a `spot policy`. By default, it is set to `on-demand`. If you want to use spot instances, you must set it to `auto` if you plan to use both on-demand and spot instances, or to `spot` if only spot instances are allowed. + +
+ +```yaml +type: fleet +name: my-fleet + +nodes: 0..2 + +# Uncomment to ensure instances are inter-connected +#placement: cluster + +# Allows both on-demand and spot +spot_policy: auto + +idle_duration: 1h + +resources: + gpu: 0..8 +``` + +
+ +Note that run configurations must specify their own `spot policy` which is also set to `on-demand` by default. ### Backends +Backend fleets allow you to set `backends` to specify which backends are allowed to be used. + ### Idle duration By default, instances of a backend fleet stay `idle` for 3 days and can be reused within that time. @@ -432,7 +458,7 @@ ssh_config: ``` !!! info "Reference" - The fleet configuration file supports many more options. See the [reference](../reference/dstack.yml/fleet.md). + The fleet configuration file supports additional options, including [`instance_types`](../reference/dstack.yml/fleet.md#instance_types), [`max_price`](../reference/dstack.yml/fleet.md#max_price), [`regions`](../reference/dstack.yml/fleet.md#max_price), among others. For the complete list, see the [reference](../reference/dstack.yml/fleet.md). ## Manage fleets