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.11rc2.tar.gz (176.4 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for dstack-0.11rc2.tar.gz
Algorithm Hash digest
SHA256 19478ff35fc64eaa10db6af1b703d61eb557435a1d4d869166cf9447af117222
MD5 2f97c9f2aae8fb12736bf2c87f10fba5
BLAKE2b-256 feaec0845706aea4a5bd744db04bc8e5f3d9d927df1ad86dda6aeef87ea08866

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dstack-0.11rc2-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.11rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 b17048cd3c7bd13e3c0c68f35bf3b2db3367d53ff194a10c7d0037bfec0dc69c
MD5 45c2cb7d770e6a22876b31b3c2dde406
BLAKE2b-256 e71bdcbc7d30d31c9822ca711d475d1ffee1111d7f3e66add4c6e52b6ccec8a3

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