Develop ML faster. Easily and cost-effectively run dev environments, pipelines, and apps on any cloud.
Project description
dstack
makes it very easy for ML engineers to run development environments and ML tasks on any cloud.
Development environments and tasks can be defined via simple YAML configurations and quickly run with a single command on any configured cloud, whether it's AWS, GCP, or Azure.
The tool is open-source and can be self-hosted. You can run it on your local machine or deploy it to your own cloud. The tool will orchestrate development environments and tasks for your entire ML team.
dstack
makes it very easy to:
- Configure and reuse prebuilt environments (without Docker)
- Utilize spot instances
- Save and reuse output artifacts
- Use multiple clouds via the same simple interface
More importantly, dstack
increases your productivity as an ML engineer, allowing you to focus on ML without worrying
about infrastructure, costs, etc.
🍒 is, dstack
is 100% open-source and can be self-hosted
Installation and setup
To use dstack
, install it with pip
and start the Hub application.
pip install "dstack[aws,gcp,azure]"
dstack start
The server will set up a default project to run dev environments and tasks locally. To run dev environments and tasks in the cloud, log into the UI, create the corresponding project, and configure the CLI to use it.
Configurations
A configuration is a YAML file that describes what you want to run.
Note: All configuration files must be named with the suffix
.dstack.yml
. For example, you can name the configuration file.dstack.yml
orapp.dstack.yml
. You can define these configurations anywhere within your project.
Configurations can be of two types: dev-environment
and task
.
Below is a configuration that runs a dev environment with a pre-built environment to which you can connect via VS Code Desktop.
type: dev-environment
setup:
- pip install -r requirements.txt
ide: vscode
Here's an example of a task configuration. A task can be either a batch job, such as training or fine-tuning a model, or a web application.
type: task
setup:
- pip install -r requirements.txt
ports:
- 7860
commands:
- gradio app.py
CLI
To run a configuration, use the dstack run
command and pass the path to the
directory with the configuration.
$ dstack run .
RUN WORKFLOW SUBMITTED USER STATUS INSTANCE
fast-moth-1 ssh now admin Submitted a2-highgpu-1g
Starting SSH tunnel...
To open in VS Code Desktop, use one of these links:
vscode://vscode-remote/ssh-remote+fast-moth-1/workflow
vscode-insiders://vscode-remote/ssh-remote+fast-moth-1/workflow
To exit, press Ctrl+C.
The CLI automatically provisions the required cloud resources and forwards the ports to your local machine. If you interrupt the run, the cloud resources will be released automatically.
Profiles
The .dstack/profiles.yml
file allows to describe multiple profiles.
ach profile can configure the project to use and the resources required for the run.
profiles:
- name: gpu-large
project: gcp
resources:
memory: 48GB
gpu:
memory: 24GB
default: true
If you have configured the default profile, the dstack run
command will use it automatically.
Otherwise, you can always specify the profile using --profile PROFILE
.
More information
For additional information and examples, see the following links:
Licence
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dstack-0.10.1.tar.gz
.
File metadata
- Download URL: dstack-0.10.1.tar.gz
- Upload date:
- Size: 150.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6860c931d52dd37b2a1b2435c30dcec9310e2aeb5b203307495266b6e9501ccb |
|
MD5 | def2760ec3e12e1096bc1476eb8e9cce |
|
BLAKE2b-256 | dffc28b66b77441b7cd9e97a25b7a0ea2ee1b921b6c77d016fcd0c19fdac3e46 |
File details
Details for the file dstack-0.10.1-py3-none-any.whl
.
File metadata
- Download URL: dstack-0.10.1-py3-none-any.whl
- Upload date:
- Size: 13.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a8cef1fe1a39f41c54f7f131449fb3b9009b36fcda37c10a7df32e7ba3d2a3f |
|
MD5 | ba0767de37bbfbde0042ccb70495b48d |
|
BLAKE2b-256 | 067947effe341231d6804f3188525c5558bfc2ab30b28055e56aafae709c29fb |