Skip to content

Commit 07304b1

Browse files
Deploying to gh-pages from @ dstackai/dstack@916b94e 🚀
1 parent 86c10a5 commit 07304b1

File tree

6 files changed

+239
-141
lines changed

6 files changed

+239
-141
lines changed

docs/concepts/fleets/index.html

Lines changed: 51 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,19 @@
886886
</span>
887887
</a>
888888

889+
</li>
890+
891+
<li class="md-nav__item">
892+
<a href="#spot-policy" class="md-nav__link">
893+
<span class="md-ellipsis">
894+
895+
<span class="md-typeset">
896+
Spot policy
897+
</span>
898+
899+
</span>
900+
</a>
901+
889902
</li>
890903

891904
<li class="md-nav__item">
@@ -4179,6 +4192,19 @@
41794192
</span>
41804193
</a>
41814194

4195+
</li>
4196+
4197+
<li class="md-nav__item">
4198+
<a href="#spot-policy" class="md-nav__link">
4199+
<span class="md-ellipsis">
4200+
4201+
<span class="md-typeset">
4202+
Spot policy
4203+
</span>
4204+
4205+
</span>
4206+
</a>
4207+
41824208
</li>
41834209

41844210
<li class="md-nav__item">
@@ -4624,12 +4650,32 @@ <h4 id="pre-provisioning">Pre-provisioning<a class="headerlink" href="#pre-provi
46244650
</details>
46254651
<h3 id="resources">Resources<a class="headerlink" href="#resources" title="Permanent link">&para;</a></h3>
46264652
<p>Backend fleets allow you to specify the resource requirements for the instances to be provisioned. The <code>resources</code> property syntax is the same as for <a href="../dev-environments/#resources">run configurations</a>.</p>
4627-
<blockquote>
4628-
<p>Not directly related, but in addition to <code>resources</code>, you can specify <a href="../../reference/dstack.yml/fleet/#instance_types"><code>spot_policy</code></a>, <a href="../../reference/dstack.yml/fleet/#instance_types"><code>instance_types</code></a>, <a href="../../reference/dstack.yml/fleet/#max_price"><code>max_price</code></a>, <a href="../../reference/dstack.yml/fleet/#max_price"><code>region</code></a>, and other <a href="../../reference/dstack.yml/fleet/">options</a>.</p>
4629-
</blockquote>
4630-
<!-- TODO: add dedicated spot policy example -->
4653+
<h3 id="spot-policy">Spot policy<a class="headerlink" href="#spot-policy" title="Permanent link">&para;</a></h3>
4654+
<p>Backend fleets allow you to specify a <code>spot policy</code>. By default, it is set to <code>on-demand</code>. If you want to use spot instances, you must set it to <code>auto</code> if you plan to use both on-demand and spot instances, or to <code>spot</code> if only spot instances are allowed.</p>
4655+
<div editor-title="fleet.dstack.yml">
4656+
4657+
<div class="highlight"><pre><span></span><code><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">fleet</span>
4658+
<span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my-fleet</span>
4659+
4660+
<span class="nt">nodes</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0..2</span>
4661+
4662+
<span class="c1"># Uncomment to ensure instances are inter-connected</span>
4663+
<span class="c1">#placement: cluster</span>
4664+
4665+
<span class="c1"># Allows both on-demand and spot</span>
4666+
<span class="nt">spot_policy</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">auto</span>
4667+
4668+
<span class="nt">idle_duration</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1h</span>
4669+
4670+
<span class="nt">resources</span><span class="p">:</span>
4671+
<span class="w"> </span><span class="nt">gpu</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0..8</span>
4672+
</code></pre></div>
4673+
4674+
</div>
46314675

4676+
<p>Note that run configurations must specify their own <code>spot policy</code> which is also set to <code>on-demand</code> by default.</p>
46324677
<h3 id="backends_1">Backends<a class="headerlink" href="#backends_1" title="Permanent link">&para;</a></h3>
4678+
<p>Backend fleets allow you to set <code>backends</code> to specify which backends are allowed to be used.</p>
46334679
<h3 id="idle-duration">Idle duration<a class="headerlink" href="#idle-duration" title="Permanent link">&para;</a></h3>
46344680
<p>By default, instances of a backend fleet stay <code>idle</code> for 3 days and can be reused within that time.
46354681
If an instance is not reused within this period, it is automatically terminated.</p>
@@ -4754,7 +4800,7 @@ <h3 id="environment-variables">Environment variables<a class="headerlink" href="
47544800
</code></pre></div>
47554801
<div class="admonition info">
47564802
<p class="admonition-title">Reference</p>
4757-
<p>The fleet configuration file supports many more options. See the <a href="../../reference/dstack.yml/fleet/">reference</a>.</p>
4803+
<p>The fleet configuration file supports additional options, including <a href="../../reference/dstack.yml/fleet/#instance_types"><code>instance_types</code></a>, <a href="../../reference/dstack.yml/fleet/#max_price"><code>max_price</code></a>, <a href="../../reference/dstack.yml/fleet/#max_price"><code>regions</code></a>, among others. For the complete list, see the <a href="../../reference/dstack.yml/fleet/">reference</a>.</p>
47584804
</div>
47594805
<h2 id="manage-fleets">Manage fleets<a class="headerlink" href="#manage-fleets" title="Permanent link">&para;</a></h2>
47604806
<h3 id="list-fleets">List fleets<a class="headerlink" href="#list-fleets" title="Permanent link">&para;</a></h3>

docs/concepts/fleets/index.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,38 @@ Pre-provisioning is supported only for [VM-based backends](backends.md#vm-based)
281281

282282
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).
283283

284-
> 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#).
284+
### Spot policy
285285

286-
<!-- TODO: add dedicated spot policy example -->
286+
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.
287+
288+
<div editor-title="fleet.dstack.yml">
289+
290+
```yaml
291+
type: fleet
292+
name: my-fleet
293+
294+
nodes: 0..2
295+
296+
# Uncomment to ensure instances are inter-connected
297+
#placement: cluster
298+
299+
# Allows both on-demand and spot
300+
spot_policy: auto
301+
302+
idle_duration: 1h
303+
304+
resources:
305+
gpu: 0..8
306+
```
307+
308+
</div>
309+
310+
Note that run configurations must specify their own `spot policy` which is also set to `on-demand` by default.
287311

288312
### Backends
289313

314+
Backend fleets allow you to set `backends` to specify which backends are allowed to be used.
315+
290316
### Idle duration
291317

292318
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:
432458
```
433459

434460
!!! info "Reference"
435-
The fleet configuration file supports many more options. See the [reference](../reference/dstack.yml/fleet.md).
461+
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).
436462

437463
## Manage fleets
438464

llms-full.txt

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,12 +1995,38 @@ Pre-provisioning is supported only for [VM-based backends](backends.md#vm-based)
19951995

19961996
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).
19971997

1998-
> 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#).
1998+
### Spot policy
1999+
2000+
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.
2001+
2002+
<div editor-title="fleet.dstack.yml">
2003+
2004+
```yaml
2005+
type: fleet
2006+
name: my-fleet
2007+
2008+
nodes: 0..2
19992009

2000-
<!-- TODO: add dedicated spot policy example -->
2010+
# Uncomment to ensure instances are inter-connected
2011+
#placement: cluster
2012+
2013+
# Allows both on-demand and spot
2014+
spot_policy: auto
2015+
2016+
idle_duration: 1h
2017+
2018+
resources:
2019+
gpu: 0..8
2020+
```
2021+
2022+
</div>
2023+
2024+
Note that run configurations must specify their own `spot policy` which is also set to `on-demand` by default.
20012025

20022026
### Backends
20032027

2028+
Backend fleets allow you to set `backends` to specify which backends are allowed to be used.
2029+
20042030
### Idle duration
20052031

20062032
By default, instances of a backend fleet stay `idle` for 3 days and can be reused within that time.
@@ -2146,7 +2172,7 @@ ssh_config:
21462172
```
21472173

21482174
!!! info "Reference"
2149-
The fleet configuration file supports many more options. See the [reference](../reference/dstack.yml/fleet.md).
2175+
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).
21502176

21512177
## Manage fleets
21522178

search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)