Installation¶
To use the open-source version of dstack
with your own cloud accounts or on-prem clusters, follow this guide.
If you don't want to host the
dstack
server (or want to access GPU marketplace), skip installation and proceed to dstack Sky .
(Optional) Configure backends¶
To use dstack
with your own cloud accounts, create the ~/.dstack/server/config.yml
file and
configure backends. Alternatively, you can configure backends via the control plane UI after you start the server.
You can skip backends configuration if you intend to run containers only on your on-prem servers. Use SSH fleets for that.
Start the server¶
The server can run on your laptop, a dedicated server, a private cloud VPC, or any location with access to your cloud or on-prem clusters.
The server can be set up via
pip
on Linux, macOS, and Windows (via WSL 2). It requires Git and OpenSSH.
$ 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/
$ docker run -p 3000:3000 \
-v $HOME/.dstack/server/:/root/.dstack/server \
dstackai/dstack
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/
If you'd like to deploy the server to a private AWS VPC, you can use our CloudFormation template .
First, ensure, you've set up a private VPC with public and private subnets.
Create a stack using the template, and specify the VPC and private subnets.
Once, the stack is created, go to Outputs
for the server URL and admin token.
To access the server URL, ensure you're connected to the VPC, e.g. via VPN client.
If you'd like to adjust anything, the source code of the template can be found at
examples/server-deployment/cloudformation/template.yaml
.
Server deployment
For more details on server configuration options, see the server deployment guide.
Set up the CLI¶
Once it's up, you can use either the CLI or the API.
The CLI can be set up on Linux, macOS, and Windows. It requires Git and OpenSSH.
Windows
To use the CLI on Windows, ensure you've installed Git and OpenSSH via Git for Windows.
When installing it, ensure you've checked
Git from the command line and also from 3-rd party software
(or Use Git and optional Unix tools from the Command Prompt
), and
Use bundled OpenSSH
.
To point the CLI to the dstack
server, configure it
with the server address, user token, and project name:
$ pip install dstack
$ dstack config --url http://127.0.0.1:3000 \
--project main \
--token bbae0f28-d3dd-4820-bf61-8f4bb40815da
Configuration is updated at ~/.dstack/config.yml
This configuration is stored in ~/.dstack/config.yml
.
What's next?¶
- Check the server/config.yml reference on how to configure backends
- Check SSH fleets to learn about running on your on-prem servers
- Follow quickstart
- Browse examples
- Join the community via Discord