Giter VIP home page Giter VIP logo

examples's Introduction

Examples

Welcome to dstack-examples. This repository contains a collection of examples demonstrating how to use dstack.

1. Setup

Install the open-source dstack server and configure clouds or sign up for dstack Sky

1.1. Install dstack

pip install "dstack[all]" -U

1.2 Configure clouds

Configure clouds via ~/.dstack/server/config.yml. Learn more.

1.3. Start the server

dstack server

2. Run examples

2.1. Init the repo

git clone https://github.com/dstackai/dstack-examples
cd dstack-examples
dstack init

2.2. Run a dev environment

Here's how to run a dev environment with the current repo:

dstack run .

2.3. Run any example

Here's how to run any of the examples, e.g. vllm:

dstack run . -f deployment/vllm/serve.dstack.yml

Find more details on each example at dstack.ai/examples.

More information

examples's People

Contributors

egor-s avatar peterschmidt85 avatar r4victor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

examples's Issues

Cannot use us-east-1 location in dstack config

Windows 11 (preview), Powershell.

(python38) PS C:\Users\bbate> aws configure list-profiles
eb-cli
default
autonet
(python38) PS C:\Users\bbate> aws configure list --profile default
      Name                    Value             Type    Location
      ----                    -----             ----    --------
   profile                  default           manual    --profile
access_key     ****************LZZW shared-credentials-file
secret_key     ****************vcH8 shared-credentials-file
    region                us-east-1      config-file    ~/.aws/config

(python38) PS C:\Users\bbate> dstack config
Configure AWS backend:

AWS profile name (default):
S3 bucket name (test-dstack): eaf-test-dstack
Region name (us-east-1):
The bucket 'eaf-test-dstack' doesn't exist. Create it? [y/n]: y

Traceback (most recent call last):
  File "c:\users\bbate\python38\lib\site-packages\dstack\aws\config.py", line 9, in configure
    s3_client.head_bucket(Bucket=bucket_name)
  File "c:\users\bbate\python38\lib\site-packages\botocore\client.py", line 388, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "c:\users\bbate\python38\lib\site-packages\botocore\client.py", line 708, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (404) when calling the HeadBucket operation: Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\bbate\appdata\local\programs\python\python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\bbate\appdata\local\programs\python\python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\bbate\python38\Scripts\dstack.exe\__main__.py", line 7, in <module>
  File "c:\users\bbate\python38\lib\site-packages\dstack\cli\main.py", line 68, in main
    args.func(args)
  File "c:\users\bbate\python38\lib\site-packages\dstack\cli\config.py", line 36, in config_func
    backend.configure(silent=False)
  File "c:\users\bbate\python38\lib\site-packages\dstack\aws\__init__.py", line 44, in configure
    config.configure(self._iam_client(), self._s3_client(), self.backend_config.bucket_name,
  File "c:\users\bbate\python38\lib\site-packages\dstack\aws\config.py", line 12, in configure
    s3_client.create_bucket(Bucket=bucket_name, CreateBucketConfiguration={
  File "c:\users\bbate\python38\lib\site-packages\botocore\client.py", line 388, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "c:\users\bbate\python38\lib\site-packages\botocore\client.py", line 708, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (InvalidLocationConstraint) when calling the CreateBucket operation: The specified location-constraint is not valid

This problem is due to the AWS API not accepting us-east-1 as a LocationConstraint, apparently due to it being the default for S3 creation. It is mentioned in this issue for boto3:

boto/boto3#125

It appears to be a known issue, not likely fixed soon, so it should be handled on the dstack side.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.