You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document that `python` and `image` are mutually exclusive for run configurations and tighten related guidance for files/repos and AMD image defaults.
Made-with: Cursor
Copy file name to clipboardExpand all lines: skills/dstack/SKILL.md
+37-1Lines changed: 37 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,7 +140,7 @@ If background attach fails in the sandbox (permissions writing `~/.dstack` or `~
140
140
`dstack` supports five main configuration types. Configuration files can be named `<name>.dstack.yml` or simply `.dstack.yml`.
141
141
142
142
**Common parameters:** All run configurations (dev environments, tasks, services) support many parameters including:
143
-
-**Git integration:** Clone repos automatically (`repo`), mount existing repos (`repos`), upload local files (`working_dir`)
143
+
-**Git integration:** Clone repos automatically (`repo`), mount existing repos (`repos`)
144
144
-**File upload:**`files` (see concept docs for examples)
145
145
-**Docker support:** Use custom Docker images (`image`); use `docker: true` if you want to use Docker from inside the container (VM-based backends only)
146
146
-**Environment:** Set environment variables (`env`), often via `.envrc`. Secrets are supported but less common.
@@ -150,6 +150,42 @@ If background attach fails in the sandbox (permissions writing `~/.dstack` or `~
150
150
**Best practices:**
151
151
- Prefer giving configurations a `name` property for easier management
152
152
- When configurations need credentials (API keys, tokens), list only env var names in the `env` section (e.g., `- HF_TOKEN`), not values. Recommend storing actual values in a `.envrc` file alongside the configuration, applied via `source .envrc && dstack apply`.
153
+
-`python` and `image` are mutually exclusive in run configurations. If `image` is set, do not set `python`.
154
+
155
+
### `files` and `repos` intent policy
156
+
157
+
Use `files` and `repos` only when the user intends to use local/repo files inside the run.
158
+
159
+
- If user asks to use project code/data/config in the run, then add `files` or `repos` as appropriate.
160
+
- If it is totally unclear whether files ore repos must be mounted, ask one explicit clarification question or default to not mounting.
161
+
162
+
`files` guidance:
163
+
- Relative paths are valid and preferred for local project files.
164
+
- A relative `files` path is placed under the run's `working_dir` (default or set by user).
165
+
166
+
`repos` + image/working directory guidance:
167
+
- With non-default Docker images, prefer explicit absolute mount targets for `repos` (e.g., `.:/dstack/run`).
168
+
- When setting an explicit repo mount path, also set `working_dir` to the same path.
169
+
- Reason: custom images may have a different/non-empty default working directory, and mounting a repo into a non-empty path can fail.
170
+
- With `dstack` default images, the default `working_dir` is already `/dstack/run`.
171
+
172
+
### AMD image selection policy
173
+
174
+
When `resources.gpu` targets AMD (e.g., `MI300X`), you have to set `image`.
175
+
176
+
Use the official ROCm Docker image namespace as the default source: `https://hub.docker.com/u/rocm`
177
+
178
+
1.**If the user provides an image, use it as-is.** Do not override user intent.
179
+
2.**If the user asks for a specific framework/runtime, prefer official `rocm/*` framework images and select tags with the latest available ROCm version by default. Pick the most recent ROCm-compatible tag appropriate for the requested AMD GPU family.**
180
+
-**SGLang:**`rocm/sgl-dev`
181
+
-**vLLM:**`rocm/vllm`
182
+
-**PyTorch-only:**`rocm/pytorch`
183
+
3.**If no framework is specified (generic AMD dev/task use case), default to**
184
+
`rocm/dev-ubuntu-24.04`.
185
+
186
+
Additional guidance:
187
+
- Prefer `:latest` where applicable for generic/default recommendations, unless the user asks for pinning or reproducibility.
188
+
- Ensure AMD-compatible images include ROCm userspace/tooling; avoid non-ROCm images for AMD GPU runs.
153
189
154
190
### 1. Dev environments
155
191
**Use for:** Interactive development with IDE integration (VS Code, Cursor, etc.).
0 commit comments