Skip to main content

dstack is an open-source tool that enables the execution of LLM workloads across multiple cloud GPU providers.

Project description

dstack

Train and deploy LLM models in multiple clouds

DocsExamplesBlogSlack

Last commit PyPI - License

dstack is an open-source tool that enables the execution of LLM workloads across multiple cloud providers – ensuring the best GPU price and availability.

Deploy services, run tasks, and provision dev environments in a cost-effective manner across multiple cloud GPU providers.

Latest news

Installation

To use dstack, install it with pip, and start the server.

pip install "dstack[aws,gcp,azure,lambda]"
dstack start

Configure backends

Upon startup, the server sets up the default project called main. Prior to using dstack, you must log in to the UI, open the project's settings, and configure cloud backends (e.g., AWS, GCP, Azure, Lambda, etc.).

Define a configuration

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 or app.dstack.yml. You can define these configurations anywhere within your project.

Configurations can be of three types: dev-environment, task, and service.

Dev environments

A dev environment is a virtual machine with a pre-configured IDE.

type: dev-environment

python: "3.11" # (Optional) If not specified, your local version is used

setup: # (Optional) Executed once at the first startup
  - pip install -r requirements.txt

ide: vscode

Tasks

A task can be either a batch job, such as training or fine-tuning a model, or a web application.

type: task

python: "3.11" # (Optional) If not specified, your local version is used

ports:
  - 7860

commands:
  - pip install -r requirements.txt
  - python app.py

While the task runs in the cloud, the CLI forwards traffic, allowing you to access the application from your local machine.

Services

A service is an application that is accessible through a public endpoint.

type: service

gateway: ${{ secrets.GATEWAY_ADDRESS }}

port: 7860

commands:
  - pip install -r requirements.txt
  - python app.py

Once the service is up, dstack makes it accessible from the Internet through the gateway.

CLI

To run a configuration, use the dstack run command followed by working directory and the path to the configuration file.

dstack run . -f serve.dstack.yml

dstack automatically provisions cloud resources based in the configured clouds that offer the best price and availability.

For every run, you can specify hardware resources like memory and GPU, along with various run policies (e.g., maximum hourly price, use of spot instances, etc.).

Example Description
dstack run . --gpu A10 Use an instance with NVIDIA A10 GPU
dstack run . --gpu A100:8 Use an instance with 8 NVIDIA A100 GPUs
dstack run . --gpu 24GB Use an instance with a GPU that has 24GB

More information

For additional information and examples, see the following links:

Licence

Mozilla Public License 2.0

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

dstack-0.11rc1.tar.gz (175.6 kB view details)

Uploaded Source

Built Distribution

dstack-0.11rc1-py3-none-any.whl (13.9 MB view details)

Uploaded Python 3

File details

Details for the file dstack-0.11rc1.tar.gz.

File metadata

  • Download URL: dstack-0.11rc1.tar.gz
  • Upload date:
  • Size: 175.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for dstack-0.11rc1.tar.gz
Algorithm Hash digest
SHA256 f55f32049c23060ca2c48a1482e3b961aa219c0f6e2900be32e47177e322df1d
MD5 4301cced02b79f2180390fa934e86022
BLAKE2b-256 f4c93d376ad200c75cd56c4b8da2d0504e0ca003fc3dec0518de8b63c861dd6b

See more details on using hashes here.

File details

Details for the file dstack-0.11rc1-py3-none-any.whl.

File metadata

  • Download URL: dstack-0.11rc1-py3-none-any.whl
  • Upload date:
  • Size: 13.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for dstack-0.11rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 7d0f629401267f1b7e7a51cac278ff1a76a7c35a8a577b59d725e89f693ad89d
MD5 1faab67afc8ce928e1b1cb4cf7a706aa
BLAKE2b-256 0a4bf70ea9577ad3143b8b9166d927eb98f6908834a53f6fa6d4b35d2bcff2a5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page