Skip to content

Commit

Permalink
- Massive overhaul of the docs and learning materials
Browse files Browse the repository at this point in the history
  • Loading branch information
peterschmidt85 committed Dec 20, 2023
1 parent 809e0ed commit 97bc27f
Show file tree
Hide file tree
Showing 30 changed files with 550 additions and 373 deletions.
10 changes: 7 additions & 3 deletions docs/assets/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,10 @@ body {
display: flex;
}

.md-sidebar__inner > .md-nav--primary > .md-nav__list > .md-nav__item > .md-nav > .md-nav__list > .md-nav__item:not(.md-nav__item--section) {
display: none;
}

.md-nav__item--section > .md-nav__link {
text-transform: uppercase;
display: inline-block;
Expand Down Expand Up @@ -710,7 +714,7 @@ body {

.md-path__link {
color: var(--md-default-fg-color);
ont-size: 0.7rem;
font-size: 0.7rem;
}

@media screen and (min-width: 76.1875em) {
Expand Down Expand Up @@ -1354,9 +1358,9 @@ div[editor-title] code .editor-title {
white-space: nowrap;
}

.md-blog-sidebar .md-nav__link--active {
/*.md-blog-sidebar .md-nav__link--active {
display: none;
}
}*/

[data-ty].no-newline, .no-newline {
display: inline-block;
Expand Down
25 changes: 23 additions & 2 deletions docs/assets/stylesheets/landing.css
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@

.md-header__buttons .md-button--primary,
.md-header__buttons .md-button-secondary {
font-weight: 500 !important;
font-weight: 400 !important;
white-space: nowrap;
}

Expand Down Expand Up @@ -250,13 +250,27 @@
}

.tx-landing__highlights_text h2 {
font-size: 2.2em;
font-size: 2.0em;
max-width: 500px;
margin-top: 1.75em;
margin-bottom: 2.5em;
letter-spacing: -1.5px;
}

.tx-landing__highlights_cta {
margin-top: 3vw;
}

.tx-landing__highlights_cta a {
display: inline-block;
font-size: 19px;
margin-top: 30px;
border: 1px solid;
padding: 10px 20px;
border-radius: 30px;
font-weight: 500;
}

.tx-landing__highlights_text h2 .gradient {
background: -webkit-linear-gradient(45deg, #0048ff, #ce00ff);
-webkit-background-clip: text;
Expand Down Expand Up @@ -690,3 +704,10 @@
font-size: 2.5rem;
}
}

.typed-cursor {
background: linear-gradient(90deg, #4631C8 -1.29%, #CD4AE2 88.05%, #FFD43C 111.26%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
padding: 0 7px;
}
4 changes: 2 additions & 2 deletions docs/blog/posts/simplified-cloud-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ run = client.runs.submit(

The `dstack.api.Run` instance provides methods for various operations including attaching to the run,
forwarding ports to `localhost`, retrieving status, stopping, and accessing logs. For more details, refer to
the [example](../../examples/deploy-python.md) and [reference](../../docs/reference/api/python/index.md).
the [example](../../learn/deploy-python.md) and [reference](../../docs/reference/api/python/index.md).

## Other changes

Expand All @@ -101,7 +101,7 @@ This means you'll need to delete `~/.dstack` and configure `dstack` from scratch
3. Configure clouds via `~/.dstack/server/config.yml` (see the [new guide](../../docs/config/server.md))
4. Run `dstack server`

The [documentation](../../docs/index.md) and [examples](../../examples/index.md) are updated.
The [documentation](../../docs/index.md) and [examples](../../learn/index.md) are updated.

## Give it a try

Expand Down
8 changes: 8 additions & 0 deletions docs/docs/config/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,3 +406,11 @@ projects:
</div>

If regions aren't specified, `dstack` will use all available regions.

## What's next?

1. Read about [dev environments](../guides/dev-environments.md), [tasks](../guides/tasks.md),
and [services](../guides/services.md)
2. See all [learning materials](../../learn/index.md)
3. Join the [Discord server](https://discord.gg/u8SmfwPpMd)
4. Sign up for [dstack Cloud](../../index.md) (if you'd like the server to be hosted by `dstack`)
9 changes: 7 additions & 2 deletions docs/docs/guides/dev-environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ide: vscode
!!! info "Configuration options"
You can specify your own Docker image, configure environment variables, etc.
If no image is specified, `dstack` uses its own Docker image (pre-configured with Python, Conda, and essential CUDA drivers).
For more details, refer to the [Reference](../reference/dstack.yml/dev-environment.md).
For more details, refer to the [Reference](../reference/dstack.yml.md#dev-environment).

## Run the configuration

Expand Down Expand Up @@ -73,4 +73,9 @@ automatically.
??? info ".gitignore"
When running a dev environment, `dstack` uses the exact version of code from your project directory.

If there are large files, consider creating a `.gitignore` file to exclude them for better performance.
If there are large files, consider creating a `.gitignore` file to exclude them for better performance.

## What's next?

1. See all [learning materials](../../learn/index.md)
2. Check the [reference](../reference/dstack.yml.md#dev-environment)
12 changes: 10 additions & 2 deletions docs/docs/guides/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ which are pre-configured with Python, Conda, and essential CUDA drivers.
!!! info "Configuration options"
Configuration file allows you to specify a custom Docker image, environment variables, and many other
options.
For more details, refer to the [Reference](../reference/dstack.yml/service.md).
For more details, refer to the [Reference](../reference/dstack.yml.md#service).

### Run the configuration

Expand Down Expand Up @@ -102,4 +102,12 @@ Once the service is deployed, its endpoint will be available at
and many other options (incl. spot instances, disk size, max price, max duration, retry policy, etc.).
For more details, refer to the [Reference](../reference/cli/index.md#dstack-run).

[//]: # (TODO: Example)
[//]: # (TODO: Example)

What's next?

1. Check the [Text Generation Inference](../../learn/tgi.md) and [vLLM](../../learn/vllm.md) examples
2. Read about [dev environments](../guides/dev-environments.md)
and [tasks](../guides/tasks.md)
3. See all [learning materials](../../learn/index.md)
4. Check the [reference](../reference/dstack.yml.md#service)
12 changes: 10 additions & 2 deletions docs/docs/guides/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ which are pre-configured with Python, Conda, and essential CUDA drivers.
!!! info "Configuration options"
Configuration file allows you to specify a custom Docker image, ports, environment variables, and many other
options.
For more details, refer to the [Reference](../reference/dstack.yml/task.md).
For more details, refer to the [Reference](../reference/dstack.yml.md#task).

### Run the configuration

Expand Down Expand Up @@ -153,4 +153,12 @@ $ dstack run . -f train.dstack.yml --retry-limit 3h

For more details on the `dstack run` command, refer to the [Reference](../reference/cli/index.md#dstack-run).

[//]: # (Using the API)
[//]: # (Using the API)

## What's next?

1. Check the [QLoRA](../../learn/qlora.md) example
2. Read about [dev environments](../guides/dev-environments.md)
and [services](../guides/services.md)
3. See all [learning materials](../../learn/index.md)
4. Check the [reference](../reference/dstack.yml.md#task)
14 changes: 11 additions & 3 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ Once `dstack` is set up, you can use CLI or API.

## Using the CLI

The CLI allows you to define configurations (what you want to run) as YAML files and run them using the `dstack run`
command.
With `dstack`, you can define what you want to run as YAML [configuration files](reference/dstack.yml.md)
and run them using the `dstack run` command.

### Define a configuration

Expand Down Expand Up @@ -182,4 +182,12 @@ Epoch 2: 100% 1719/1719 [00:18<00:00, 92.32it/s, loss=0.0981, acc=0.969]
</div>

No need to worry about copying code, setting up environment, IDE, etc. `dstack` handles it all
automatically.
automatically.

## What's next?

1. Configure [cloud accounts](config/server.md)
2. Read about [dev environments](guides/dev-environments.md), [tasks](guides/tasks.md),
and [services](guides/services.md)
3. See all [learning materials](../learn/index.md)
4. Join the [Discord server](https://discord.gg/u8SmfwPpMd)
43 changes: 43 additions & 0 deletions docs/docs/reference/dstack.yml.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# .dstack.yml

With `dstack`, you can define what you want to run as YAML configuration files
and run them using the `dstack run` command.

!!! info "Filename"
Configuration files must have a name ending with `.dstack.yml` (e.g., `.dstack.yml` or `dev.dstack.yml` are both acceptable).
Configuration files can be placed either in the project's root directory or in any nested folder.

Configurations can be of three types: `dev-environment`, `task`, and `service`.

Below, you'll find the complete reference detailing all available properties for each type of configuration.

## dev-environment

This configuration type allows you to provision a [dev environment](../guides/dev-environments.md) with the required cloud resources,
code, and environment.

#SCHEMA# dstack._internal.core.models.configurations.DevEnvironmentConfiguration
overrides:
show_root_heading: false
type:
required: true

## task

This configuration type allows you to run [tasks](../guides/tasks.md) like training scripts, batch jobs, or web apps.

#SCHEMA# dstack._internal.core.models.configurations.TaskConfiguration
overrides:
show_root_heading: false
type:
required: true

## service

This configuration type allows you to deploy models or web apps as [services](../guides/services.md).

#SCHEMA# dstack._internal.core.models.configurations.ServiceConfiguration
overrides:
show_root_heading: false
type:
required: true
26 changes: 0 additions & 26 deletions docs/docs/reference/dstack.yml/dev-environment.md

This file was deleted.

17 changes: 0 additions & 17 deletions docs/docs/reference/dstack.yml/index.md

This file was deleted.

32 changes: 0 additions & 32 deletions docs/docs/reference/dstack.yml/service.md

This file was deleted.

28 changes: 0 additions & 28 deletions docs/docs/reference/dstack.yml/task.md

This file was deleted.

9 changes: 9 additions & 0 deletions docs/learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
template: learn.html
title: Learning materials
hide:
- path
- navigation
- toc
- footer
---
2 changes: 1 addition & 1 deletion docs/learn/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
template: learn.html
title: Learning center
title: Learning materials
hide:
- navigation
- toc
Expand Down
Loading

0 comments on commit 97bc27f

Please sign in to comment.