Skip to content

dstackai/dstack

master
Switch branches/tags
Code

The easiest way to build AI apps


pypi stat slack

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 train

Workflows are optional. You can run providers directly from the CLI:

dstack run python train.py \
  --dep prepare:latest --artifact checkpoint --gpu 1

Run applications

Here's how to run applications:

dstack run streamlit app.py --dep model:latest

Launch 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 1

This 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:

  1. Create pull requests with bugfixes, new providers and examples, and improvements to the docs.
  2. Send us links to your own projects that use dstack to be featured here.
  3. Report bugs to our issue tracker.
  4. 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.

About

Run anything in the cloud from the CLI as you do locally. Store artifacts in central file storage.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks