Skip to content

Commit f6a398d

Browse files
[Docs] Move Plugins to Reference | Python API (#3148)
1 parent b7ed1b3 commit f6a398d

3 files changed

Lines changed: 12 additions & 14 deletions

File tree

docs/docs/guides/plugins.md renamed to docs/docs/reference/plugins/python/index.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
The `dstack` plugin system allows extending `dstack` server functionality using external Python packages.
44

55
!!! info "Experimental"
6-
Plugins are currently an _experimental_ feature.
7-
Backward compatibility is not guaranteed across releases.
6+
Plugins are currently an experimental feature. Backward compatibility is not guaranteed across releases.
87

98
## Enable plugins
109

11-
To enable a plugin, list it under `plugins` in [`server/config.yml`](../reference/server/config.yml.md):
10+
To enable a plugin, list it under `plugins` in [`server/config.yml`](../../server/config.yml.md):
1211

1312
<div editor-title="server/config.yml">
1413

@@ -24,7 +23,7 @@ projects:
2423
2524
On the next server restart, you should see a log message indicating that the plugin is loaded.
2625
27-
## Create plugins
26+
## Create a plugin
2827
2928
To create a plugin, create a Python package that implements a subclass of
3029
`dstack.plugins.Plugin` and exports this subclass as a "dstack.plugins" entry point.
@@ -61,7 +60,7 @@ To create a plugin, create a Python package that implements a subclass of
6160

6261
</div>
6362

64-
3. Specify a "dstack.plugins" entry point in `pyproject.toml`:
63+
3. Specify a `"dstack.plugins"` entry point in `pyproject.toml`:
6564

6665
<div editor-title="pyproject.toml">
6766

@@ -74,10 +73,9 @@ To create a plugin, create a Python package that implements a subclass of
7473

7574
Then you can install the plugin package into your Python environment and enable it via `server/config.yml`.
7675

77-
??? info "Plugins in Docker"
76+
??? info "Docker"
7877
If you deploy `dstack` using a Docker image you can add plugins either
79-
by including them in your custom image built upon the `dstack` server image,
80-
or by mounting installed plugins as volumes.
78+
by including them in your custom image built upon the `dstack` [server image :material-arrow-top-right-thin:{ .external }](https://github.com/dstackai/dstack/tree/master/docker/server){:target="_blank"}, or by mounting installed plugins as volumes.
8179

8280
## Apply policies
8381

@@ -113,9 +111,9 @@ class ExamplePolicy(ApplyPolicy):
113111

114112
</div>
115113

116-
## Built-in Plugins
114+
## Built-in plugins
117115

118-
### REST Plugin
116+
### REST plugin
119117

120118
`rest_plugin` is a builtin `dstack` plugin that allows writing your custom plugins as API servers, so you don't need to install plugins as Python packages.
121119

@@ -125,4 +123,4 @@ Plugins implemented as API servers have advantages over plugins implemented as P
125123
* You can use any programming language.
126124
* If you run the `dstack` server via Docker, you don't need to extend the `dstack` server image with plugins or map them via volumes.
127125

128-
To get started, check out the [plugin server example](https://github.com/dstackai/dstack/tree/master/examples/plugins/example_plugin_server). The `rest_plugin` server API is documented [here](../reference/plugins/rest_plugin/index.md).
126+
To get started, check out the [plugin server example :material-arrow-top-right-thin:{ .external }](https://github.com/dstackai/dstack/tree/master/examples/plugins/example_plugin_server){:target="_blank"}. The `rest_plugin` server API is documented [here](../../plugins/rest/index.md).
File renamed without changes.

mkdocs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ nav:
235235
- Troubleshooting: docs/guides/troubleshooting.md
236236
- Metrics: docs/guides/metrics.md
237237
- Protips: docs/guides/protips.md
238-
- Plugins: docs/guides/plugins.md
239238
- Reference:
240239
- .dstack.yml:
241240
- dev-environment: docs/reference/dstack.yml/dev-environment.md
@@ -245,7 +244,6 @@ nav:
245244
- gateway: docs/reference/dstack.yml/gateway.md
246245
- volume: docs/reference/dstack.yml/volume.md
247246
- server/config.yml: docs/reference/server/config.yml.md
248-
- .dstack/profiles.yml: docs/reference/profiles.yml.md
249247
- CLI:
250248
- dstack server: docs/reference/cli/dstack/server.md
251249
- dstack init: docs/reference/cli/dstack/init.md
@@ -266,8 +264,10 @@ nav:
266264
- Python API: docs/reference/api/python/index.md
267265
- REST API: docs/reference/api/rest/index.md
268266
- Environment variables: docs/reference/environment-variables.md
267+
- .dstack/profiles.yml: docs/reference/profiles.yml.md
269268
- Plugins:
270-
- REST Plugin API: docs/reference/plugins/rest_plugin/index.md
269+
- Python API: docs/reference/plugins/python/index.md
270+
- REST API: docs/reference/plugins/rest/index.md
271271
- Examples:
272272
- examples.md
273273
- Single-node training:

0 commit comments

Comments
 (0)