dstack allows you to train models and run AI apps in your cloud account.
- Define your machine learning tasks as workflows, and run them via the CLI.
- Specify hardware requirements for your workflows as code.
- Deploy AI applications to dstack with a single command.
- Store, version, and reuse data the most simple way.
- Launch pre-configured development environments with a single command.
This repository contains the open source code of the built-in providers, the CLI, and documentation.
π Documentation
See full documentation at docs.dstack.ai
π Getting started
To use dstack, you have to create an account, and obtain your personal token.
Install the CLI
Here's how to do it:
pip install dstack
dstack config --token <token> Define workflows
Your common project tasks can be defined as workflows:
Click to see an example
workflows:
- name: prepare
help: "Loads and prepares the training data"
provider: python
file: "prepare.py"
artifacts: ["data"]
- name: train
help: "Trains a model and saves the checkpoints"
depends-on:
- prepare:latest
provider: python
file: "train.py"
artifacts: ["checkpoint"]
resources:
gpu: 1 Run any workflow in the cloud via a single command:
$ dstack run trainWorkflows are optional. You can run providers directly from the CLI:
dstack run python train.py \
--dep prepare:latest --artifact checkpoint --gpu 1Run applications
Here's how to run applications:
dstack run streamlit app.py --dep model:latestLaunch dev environments
If you need an interactive dev environment, you can have it too through the corresponding provider:
dstack run code app.py --dep prepare:latest --gpu 1This will run a VS Code with mounted artifacts and requested hardware resources.
π§© Providers
Find the full list of built-in providers along examples and their source code here.
πββοΈ Contributing
There are several ways to contribute to dstack:
- Create pull requests with bugfixes, new providers and examples, and improvements to the docs.
- Send us links to your own projects that use dstack to be featured here.
- Report bugs to our issue tracker.
- Ask questions and share news within our Slack community.
Remember, it's important to respect other members of the community. In case you're not sure about the rules, check out code of conduct.
π Troubleshooting and help
Use our Slack community to get help and support.