- Clone the repo:
git clone https://github.com/dstackai/dstack && cd dstack
- (Recommended) Create a virtual environment:
python3 -m venv venv
source venv/bin/activate
- Install
dstack
in editable mode:pip install -e '.[all]'
- Install dev dependencies:
pip install -r cli/requirements_dev.txt
- Build the frontend:
./scripts/build_frontend.sh
- (Recommended) Install pre-commits:
pre-commit install
For more information on frontend development, see hub/README.md.
- Look for an existing issue or create a new one.
- Fork the repo.
- Commit your changes.
- Open a PR. Link the PR to the issue if you are solving one.
We use black
to format Python code and isort
to sort Python imports. Before committing your changes, run:
isort --settings-file pyconfig.toml cli
black --config pyconfig.toml cli
There are also helper pre-commits installed for black
and isort
that make commits fail if the code is not formatted or the imports are not sorted. They also change the code as required so that you can review the changes and commit again.
Feel free to open an issue if you have difficulties contributing to dstack
.