dstack is an open-source toolkit for running LLM workloads across any clouds.
Project description
dstack
is an open-source toolkit for running LLM workloads across any clouds, offering a
cost-efficient and user-friendly interface for training, inference, and development.
Latest news ✨
- [2023/08] Fine-tuning with Llama 2 (Example)
- [2023/08] An early preview of services (Release)
- [2023/08] Serving SDXL with FastAPI (Example)
- [2023/07] Serving LLMS with TGI (Example)
- [2023/07] Serving LLMS with vLLM (Example)
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
orapp.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
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
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.11.1.tar.gz
.
File metadata
- Download URL: dstack-0.11.1.tar.gz
- Upload date:
- Size: 180.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9659a944e161b20c99de18487bc5d8dd1cb2c3b8a9a73a55ed990bff496e311 |
|
MD5 | a030ac5d632518a3aefcac852069a214 |
|
BLAKE2b-256 | c9bc69555e0eaddda84f241e17b2e2c70c693b350d6b9b0c685f5052cf4625cb |
File details
Details for the file dstack-0.11.1-py3-none-any.whl
.
File metadata
- Download URL: dstack-0.11.1-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f6ea331a54ceddb48a8472e79da4b3941dc0ed3186d63cb31aca9e5215533a5 |
|
MD5 | 4396e3d78191811a7c9b742886abbbd6 |
|
BLAKE2b-256 | 050a56454f1196b427fba71082cf4eb25232f5a615c29193f58e8f523a0c7c79 |