Volumes
Optional instance volumes
Instance volumes can now be made optional
. When a volume is marked as optional, it will be mounted only if the backend supports instance volumes; otherwise, it will not be mounted.
type: dev-environment
ide: vscode
volumes:
- instance_path: /dstack-cache
path: /root/.cache/
optional: true
Optional instance volumes are useful for caching, allowing runs to work with backends that don’t support them, such as runpod
, vastai
, and kubernetes
.
Services
Path prefix
Previously, if you were running services without a gateway, it was not possible to deploy certain web apps, such as Dash. This was due to the path prefix /proxy/services/<project name>/<run name>/
in the endpoint URL.
With this new update, it’s now possible to configure a service so that such web apps work without a gateway. To do this, set the strip_prefix
property to false
and pass the prefix to the web app. Here’s an example with a Dash app:
type: service
name: my-dash-app
gateway: false
# Disable authorization
auth: false
# Do not strip the path prefix
strip_prefix: false
env:
# Configure Dash to work with a path prefix
- DASH_ROUTES_PATHNAME_PREFIX=/proxy/services/main/my-dash-app/
commands:
- pip install dash
- python app.py
port: 8050
Git
Branches
When you run dstack apply
, before dstack
starts a container, it fetches the code from the repository where dstack apply
was invoked. If the repository is a remote Git repo, dstack
clones it using the user’s Git credentials.
Previously, dstack
always cloned only a single branch in this scenario (to ensure faster startup).
With this update, for development environments, dstack
now clones all branches by default. You can override this behavior using the new single_branch
property.
SSH
If you override the user
property in your run configuration, dstack
runs the container as that user. Previously, when accessing the dev environment via VS Code or connecting to the run with the ssh <run name>
command, you were still logged in as the root user and had to switch manually. Now, you are automatically logged in as the configured user.
What's changed
- Update contributing guide on runs and jobs by @r4victor in #2247
- Remove no offers warnings for SSH fleets by @jvstme in #2249
- Allow configuring single_branch by @r4victor in #2256
- Fix SSH fleet and gateway configuration change detection by @r4victor in #2258
- Update contributing guide on shim by @un-def in #2255
- Configuring if service path prefix is stripped by @jvstme in #2254
- [
dstack-runner
] Back up and restore~/.ssh
files by @un-def in #2261 - Use
user
property as the default user for SSH by @un-def in #2263 - Support optional instance volumes by @jvstme in #2260
- Extend request/response logging by @jvstme in #2265
Full changelog: 0.18.39...0.18.40