Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- "master"
paths-ignore:
- "docs/**"
- "mkdocs/**"
- "mkdocs.yml"
pull_request:
branches:
Expand Down
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ uv.lock
/src/dstack/_internal/server/statics

profiling_results.html
docs/docs/reference/api/http/openapi.json
docs/docs/reference/api/rest/openapi.json
docs/docs/reference/plugins/rest/rest_plugin_openapi.json

mkdocs/docs/reference/api/http/openapi.json
mkdocs/docs/reference/api/rest/openapi.json
mkdocs/docs/reference/plugins/rest/rest_plugin_openapi.json
7 changes: 4 additions & 3 deletions .justfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
# Run `just` to see all available commands.
#
# Components:
# * runner/justfile – Building and uploading dstack runner and shim
# * runner/.justfile – Building and uploading dstack runner and shim
# * frontend/.justfile – Building and running the frontend
# * mkdocs/.justfile – Building and previewing the docs site

default:
@just --list
Expand All @@ -16,5 +18,4 @@ import "runner/.justfile"

import "frontend/.justfile"

docs-serve:
uv run mkdocs serve --livereload -w examples -s
import "mkdocs/.justfile"
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- Core Python package lives in `src/dstack`; internal modules (including server) sit under `_internal`, API surfaces under `api`, and plugin integrations under `plugins`.
- Tests reside in `src/tests` and mirror package paths; add new suites alongside the code they cover.
- Frontend lives in `frontend` (React/webpack) and is built into `src/dstack/_internal/server/statics`.
- Docs sources are in `docs` with extra contributor notes in `contributing/*.md`; examples for users sit in `examples/`.
- Docs sources are in `mkdocs/docs/` with extra contributor notes in `contributing/*.md`.

## Build, Test, and Development Commands
- Install deps (editable package with extras): `uv sync --all-extras` (uses `.venv` in repo).
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<h2>
<a target="_blank" href="https://dstack.ai">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/dstackai/dstack/master/docs/assets/images/dstack-logo-dark.svg"/>
<img alt="dstack" src="https://raw.githubusercontent.com/dstackai/dstack/master/docs/assets/images/dstack-logo.svg" width="350px"/>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/dstackai/dstack/master/mkdocs/assets/images/dstack-logo-dark.svg"/>
<img alt="dstack" src="https://raw.githubusercontent.com/dstackai/dstack/master/mkdocs/assets/images/dstack-logo.svg" width="350px"/>
</picture>
</a>
</h2>
Expand Down
4 changes: 2 additions & 2 deletions contributing/BACKENDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ If instances in the backend take more than 10 minutes to start, override the def

### 2.10. Document the backend

Add the backend to the [Concepts->Backends](https://github.com/dstackai/dstack/blob/master/docs/docs/concepts/backends.md
) page and the [server/comfig.yml](https://github.com/dstackai/dstack/blob/master/docs/docs/reference/server/config.yml.md) reference.
Add the backend to the [Concepts->Backends](https://github.com/dstackai/dstack/blob/master/mkdocs/docs/concepts/backends.md
) page and the [server/comfig.yml](https://github.com/dstackai/dstack/blob/master/mkdocs/docs/reference/server/config.yml.md) reference.

## 3. Appendix

Expand Down
62 changes: 26 additions & 36 deletions contributing/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ uv run pre-commit install
To preview the documentation, run the follow command:

```shell
uv run mkdocs serve -w examples -s
uv run mkdocs serve --livereload -s
```

The `--livereload` flag is required to work around live-reload bugs in recent `mkdocs` versions.

If you want to build static files, you can use the following command:

```shell
Expand All @@ -57,7 +59,6 @@ The documentation uses a custom build system with MkDocs hooks to generate vario
Use these in `.envrc` to disable expensive docs regeneration, especially during `mkdocs serve` auto-reload. Set any of them to disable the corresponding artifact.

```shell
export DSTACK_DOCS_DISABLE_EXAMPLES=1
export DSTACK_DOCS_DISABLE_LLM_TXT=1
export DSTACK_DOCS_DISABLE_CLI_REFERENCE=1
export DSTACK_DOCS_DISABLE_YAML_SCHEMAS=1
Expand All @@ -69,19 +70,11 @@ export DSTACK_DOCS_DISABLE_REST_PLUGIN_SPEC_REFERENCE=1

The build process is customized via hooks in `scripts/docs/hooks.py`:

#### 1. Example materialization

Example pages like `examples/single-node-training/trl/index.md` are stubs that reference `README.md` files in the repository root:
- **Stub location**: `docs/examples/single-node-training/trl/index.md`
- **Content source**: `examples/single-node-training/trl/README.md`

During the build, the hook reads the README content and uses it for rendering the HTML page.

#### 2. Schema reference expansion
#### 1. Schema reference expansion

Files in `docs/reference/**/*.md` can use `#SCHEMA#` placeholders that are expanded with generated schema documentation during the build.

#### 3. llms.txt generation
#### 2. llms.txt generation

Two files are generated for LLM consumption:

Expand All @@ -108,9 +101,9 @@ description: Short description of what this page covers
---
```

For examples, add frontmatter to the `README.md` files in the repository root (e.g., `examples/single-node-training/trl/README.md`).
For examples, add frontmatter to the page files (e.g., `mkdocs/docs/examples/training/trl.md`).

#### 4. Skills discovery
#### 3. Skills discovery

The build creates `.well-known/skills/` directory structure for skills discovery:
- Reads `skills/dstack/SKILL.md`
Expand All @@ -121,35 +114,32 @@ The build creates `.well-known/skills/` directory structure for skills discovery
### File structure

```
docs/
├── docs/ # Main documentation content
│ ├── index.md # Getting started
mkdocs/ # docs_dir for the mkdocs site
├── index.md # Homepage
├── docs/ # /docs/ URL section
│ ├── index.md # Getting started
│ ├── installation.md
│ ├── quickstart.md
│ ├── concepts/ # Concept pages
│ ├── guides/ # How-to guides
│ └── reference/ # API reference (schema expansion)
├── examples/ # Example stub files (index.md)
│ └── single-node-training/
│ └── trl/
│ └── index.md # Stub referencing root README
└── overrides/ # Theme customization

examples/ # Example content (repository root)
└── single-node-training/
└── trl/
├── README.md # Actual content with frontmatter
└── train.dstack.yml
│ ├── concepts/ # Concept pages
│ ├── guides/ # How-to guides
│ ├── reference/ # API reference (schema expansion)
│ └── examples/ # Example pages (inline source code)
│ └── training/
│ └── trl.md # Page content with frontmatter
├── blog/ # Blog posts
├── overrides/ # Theme customization
├── layouts/ # Social card layouts
└── assets/ # Stylesheets, images, fonts

scripts/docs/
├── hooks.py # MkDocs build hooks
├── gen_llms_files.py # llms.txt generation
├── gen_schema_reference.py # Schema expansion
└── gen_cli_reference.py # CLI reference generation
├── hooks.py # MkDocs build hooks
├── gen_llms_files.py # llms.txt generation
├── gen_schema_reference.py # Schema expansion
└── gen_cli_reference.py # CLI reference generation

skills/
└── dstack/
└── SKILL.md # Skills discovery content
└── SKILL.md # Skills discovery content
```

### Testing changes
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file removed docs/examples/llms/llama/index.md
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
9 changes: 0 additions & 9 deletions examples/accelerators/tenstorrent/.dstack.yml

This file was deleted.

24 changes: 0 additions & 24 deletions examples/accelerators/tenstorrent/tt-inference-server.dstack.yml

This file was deleted.

10 changes: 0 additions & 10 deletions examples/accelerators/tenstorrent/tt-smi.dstack.yml

This file was deleted.

8 changes: 0 additions & 8 deletions examples/clusters/aws/fleet.dstack.yml

This file was deleted.

7 changes: 0 additions & 7 deletions examples/clusters/gcp/a3-fleet.dstack.yml

This file was deleted.

7 changes: 0 additions & 7 deletions examples/clusters/gcp/a3high-fleet.dstack.yml

This file was deleted.

37 changes: 0 additions & 37 deletions examples/clusters/gcp/a3high-nccl-tests.dstack.yml

This file was deleted.

50 changes: 0 additions & 50 deletions examples/clusters/gcp/a3mega-nccl-tests.dstack.yml

This file was deleted.

13 changes: 0 additions & 13 deletions examples/clusters/gcp/a4-fleet.dstack.yml

This file was deleted.

29 changes: 0 additions & 29 deletions examples/clusters/nccl-rccl-tests/nccl-tests.dstack.yml

This file was deleted.

Loading
Loading