Skip to content

Commit

Permalink
[Docs] Removed repeating examples; improved reference pages; updated …
Browse files Browse the repository at this point in the history
…the home page.
  • Loading branch information
peterschmidt85 committed May 15, 2024
1 parent 3f1504b commit 50e09f3
Show file tree
Hide file tree
Showing 18 changed files with 740 additions and 1,239 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Orchestrate AI workloads in any cloud

<p align="center">
<a href="https://dstack.ai/docs" target="_blank"><b>Docs</b></a> •
<a href="https://github.com/dstackai/dstack/blob/master/examples/README.md" target="_blank"><b>Examples</b></a> •
<a href="https://github.com/dstackai/dstack/tree/master/examples" target="_blank"><b>Examples</b></a> •
<a href="https://discord.gg/u8SmfwPpMd" target="_blank"><b>Discord</b></a>
</p>

Expand Down
4 changes: 2 additions & 2 deletions docker/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ _**️Note:** The use of Litestream requires that only one instance of the dstac
For additional information and examples, see the following links:

* [Docs](https://dstack.ai/docs/)
* [Examples](https://github.com/dstackai/dstack/blob/master/examples/README.md)
* [Changelog](https://dstack.ai/changelog)
* [Examples](https://github.com/dstackai/dstack/tree/master/examples)
* [Changelog](https://github.com/dstackai/dstack/releases)
* [Discord](https://discord.gg/u8SmfwPpMd)

## Licence
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,7 @@ html .md-footer-meta.md-typeset a:is(:focus,:hover) {
[dir=ltr] .md-typeset blockquote {
border: 1px solid black;
color: var(--md-default-fg-color);
padding: 0 20px;
padding: 8px 25px;
border-radius: 12px;
}

Expand Down
11 changes: 7 additions & 4 deletions docs/assets/stylesheets/landing.css
Original file line number Diff line number Diff line change
Expand Up @@ -666,10 +666,10 @@
}

.plans_card.dstack_sky {
background: -webkit-linear-gradient(45deg, rgba(0, 42, 255, 0.2), rgb(0 114 255 / 1%), rgba(0, 42, 255, 0.07));
}

.plans_card.enterprise {
background: -webkit-linear-gradient(45deg, rgba(0, 42, 255, 0.0125), rgb(0 114 255 / 1%), rgba(0, 42, 255, 0.07));
}

.plans_card {
Expand All @@ -688,15 +688,18 @@
border-right: none;
border-top-left-radius: 12px;
border-bottom-left-radius: 12px;
margin-right: 5px;
}

.plans_card.dstack_sky {
}

.plans_card.enterprise {
border-left: none;
border-top-right-radius: 12px;
border-bottom-right-radius: 12px;
margin-left: 5px;
}

.plans_card.enterprise {
margin: 0 -5px;
}

.tx-landing__plans_cards {
Expand Down
36 changes: 5 additions & 31 deletions docs/docs/concepts/dev-environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,37 +26,11 @@ resources:
</div>
> See the [.dstack.yml reference](../reference/dstack.yml/dev-environment.md) for more details.
If you don't specify your Docker image, `dstack` uses the [base](https://hub.docker.com/r/dstackai/base/tags) image
(pre-configured with Python, Conda, and essential CUDA drivers).

### Environment variables

Environment variables can be set either within the configuration file or passed via the CLI.

```yaml
type: dev-environment
env:
- HUGGING_FACE_HUB_TOKEN
- HF_HUB_ENABLE_HF_TRANSFER=1
python: "3.11"
ide: vscode
resources:
gpu: 80GB
```

If you don't assign a value to an environment variable (see `HUGGING_FACE_HUB_TOKEN` above),
`dstack` will require the value to be passed via the CLI or set in the current process.

For instance, you can define environment variables in a `.env` file and utilize tools like `direnv`.

!!! info "Profiles"
In case you'd like to reuse certain parameters (such as spot policy, retry and max duration,
max price, regions, instance types, etc.) across runs, you can define them via [`.dstack/profiles.yml`](../reference/profiles.yml.md).
> See the [.dstack.yml reference](../reference/dstack.yml/dev-environment.md)
> for many examples on dev envioronment configuration.

## Running

Expand Down Expand Up @@ -84,14 +58,14 @@ To open in VS Code Desktop, use this link:
</div>
When `dstack` provisions the dev environment, it uses the current folder contents.
When `dstack` provisions the dev environment, it mounts the project folder contents.

!!! info ".gitignore"
If there are large files or folders you'd like to avoid uploading,
you can list them in `.gitignore`.

The `dstack run` command allows specifying many things, including spot policy, retry and max duration,
max price, regions, instance types, and [much more](../reference/cli/index.md#dstack-run).
> See the [CLI reference](../reference/cli/index.md#dstack-run) for more details
> on how `dstack run` works.

### VS Code

Expand Down
12 changes: 4 additions & 8 deletions docs/docs/concepts/pools.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Pools enable the efficient reuse of cloud instances and on-premises servers acro

## Adding instances

### `dstack run`
### Automatic provisioning

By default, when using the `dstack run` command, it tries to reuse an instance from a pool. If no idle instance meets the
requirements, `dstack` automatically provisions a new cloud instance and adds it to the pool.
Expand All @@ -18,7 +18,7 @@ requirements, `dstack` automatically provisions a new cloud instance and adds it
This means that if the run is finished and the instance remains idle for longer than five minutes, it is automatically
removed from the pool. To override the default idle duration, use `--idle-duration DURATION` with `dstack run`.

### `dstack pool add`
### Manual provisioning

To manually provision a cloud instance and add it to a pool, use [`dstack pool add`](../reference/cli/index.md#dstack-pool-add):

Expand Down Expand Up @@ -51,7 +51,7 @@ For more details on policies and their defaults, refer to [`.dstack/profiles.yml
??? info "Limitations"
The `dstack pool add` command is not supported for Kubernetes, VastAI, and RunPod backends yet.

### `dstack pool add-ssh`
### Adding on-prem servers

Any on-prem server that can be accessed via SSH can be added to a pool and used to run workloads.

Expand All @@ -61,7 +61,7 @@ the SSH key.
<div class="termy">

```shell
$ dstack pool add-ssh [email protected] -i ~/.ssh/id_rsa
$ dstack pool add-ssh -i ~/.ssh/id_rsa [email protected]
```

</div>
Expand All @@ -77,8 +77,6 @@ Once the instance is provisioned, you'll see it in the pool and will be able to

If the instance remains idle for the configured idle duration, `dstack` removes it and deletes all cloud resources.

### `dstack pool remove`

To remove an instance from the pool manually, use the `dstack pool remove` command.

<div class="termy">
Expand All @@ -91,8 +89,6 @@ $ dstack pool remove &lt;instance name&gt;

## List instances

### `dstack pool ps`

The [`dstack pool ps`](../reference/cli/index.md#dstack-pool-ps) command lists active instances and their status (`busy`
or `idle`).

Expand Down
Loading

0 comments on commit 50e09f3

Please sign in to comment.