dstack 是一个统一的 GPU 资源供应与编排控制平面,可与任何 GPU 云、Kubernetes 或本地集群协同工作。
它简化了开发、训练和推理流程,并兼容任何硬件、开源工具和框架。
dstack 开箱即用支持 NVIDIA、AMD、Google TPU、Intel Gaudi 和 Tenstorrent 加速器。
在使用
dstackCLI 或 API 之前,需要先设置dstack服务器。如果你已经有一个正在运行的dstack服务器,则只需设置 CLI。
为了跨 GPU 云或 Kubernetes 集群编排计算资源,你需要配置后端。
后端可以在 ~/.dstack/server/config.yml 中设置,或通过 UI 中的项目设置页面进行配置。
更多详情,请参阅后端。
当
dstack与本地服务器一起使用时,无需配置后端。服务器启动后,只需创建 SSH 集群即可。
你可以在 Linux、macOS 和 Windows(通过 WSL 2)上安装服务器。它需要 Git 和 OpenSSH。
$ uv tool install "dstack[all]" -U
$ pip install "dstack[all]" -U
安装完成后,即可启动服务器。
$ dstack server
Applying ~/.dstack/server/config.yml...
The admin token is "bbae0f28-d3dd-4820-bf61-8f4bb40815da"
The server is running at http://127.0.0.1:3000/
有关服务器配置选项的更多详细信息,请参阅服务器部署指南。
$ uv tool install dstack -U
##### pip
$ pip install dstack -U
要将 CLI 指向 `dstack` 服务器,请使用服务器地址、用户令牌和项目名称进行配置:
$ dstack project add \
--name main \
--url http://127.0.0.1:3000 \
--token bbae0f28-d3dd-4820-bf61-8f4bb40815da
Configuration is updated at ~/.dstack/config.yml
dstack 支持以下配置:
配置可以在你的代码仓库中定义为 YAML 文件。
通过 dstack apply CLI 命令或编程 API 应用配置。
dstack 会自动管理跨云和本地集群的资源供应、作业排队、自动扩缩容、网络、卷、运行失败、容量不足错误、端口转发等。
更多信息,请查看以下链接:
我们非常欢迎你为 dstack 做出贡献。
有关如何为项目做出贡献的更多信息,请参阅 CONTRIBUTING.md。