Skip to main content

dstack is an open-source tool that simplifies LLM development across multiple clouds.

Project description

dstack

Cost-effective LLM development

DocsExamplesBlogSlack

Last commit PyPI - License

dstack is an open-source tool that simplifies LLM development across multiple clouds.

It streamlines development and deployment, reduces cloud costs, and frees users from vendor lock-in.

Latest news

Installation

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

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

On startup, the server sets up a default project that runs everything locally. To run dev environments and tasks in the cloud, log into the UI, create the corresponding project, and configure the CLI to use it.

Configurations

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 two types: dev-environment and task.

Below is a configuration that runs a dev environment with a pre-built environment to which you can connect via VS Code Desktop.

type: dev-environment

init:
  - pip install -r requirements.txt

ide: vscode

Here's an example of a task configuration. A task can be either a batch job, such as training or fine-tuning a model, or a web application.

type: task

ports:
  - 7860

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

CLI

To run a configuration, use the dstack run command and pass the path to the directory with the configuration.

$ dstack run . 

 RUN          CONFIGURATION  USER   PROJECT  INSTANCE  RESOURCES        SPOT
 fast-moth-1  .dstack.yml    admin  local    -         5xCPUs, 15987MB  auto  

Starting SSH tunnel...

To open in VS Code Desktop, use this link:
  vscode://vscode-remote/ssh-remote+fast-moth-1/workflow

To exit, press Ctrl+C.

The CLI automatically provisions the required cloud resources and forwards the ports to your local machine. If you interrupt the run, the cloud resources will be released automatically.

Profiles

The .dstack/profiles.yml file allows to describe multiple profiles. ach profile can configure the project to use and the resources required for the run.

profiles:
  - name: gpu-large
    project: gcp
    resources:
       memory: 48GB
       gpu:
         memory: 24GB
    default: true

If you have configured the default profile, the dstack run command will use it automatically. Otherwise, you can always specify the profile using --profile PROFILE.

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.10.7rc1.tar.gz (161.6 kB view details)

Uploaded Source

Built Distribution

dstack-0.10.7rc1-py3-none-any.whl (13.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dstack-0.10.7rc1.tar.gz
  • Upload date:
  • Size: 161.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.10.7rc1.tar.gz
Algorithm Hash digest
SHA256 b37bb323b68226543a9122e9a5c5fb6c62eb558e79206e8e8bea60443a75e4bb
MD5 9c94701def1f1e606e005f659aa93636
BLAKE2b-256 60face35dd3e9e98876a7203bb89b145c801d9f2623a5ee37fc7a30e8a7aa984

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dstack-0.10.7rc1-py3-none-any.whl
  • Upload date:
  • Size: 13.8 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.10.7rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 e2d31c70278e55d9e2bd116ec7e3512ecf242dd66180d8ef048a3208a1c44cbb
MD5 2d9d93f186e7829c25d1bed0e2586b09
BLAKE2b-256 2d025ab016667a5cb55f10e8ce0b16301018d04eb47323ca9ca894368e2514f8

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