{{ message }}
Migration to uv, added instructions and fixed workflows#756
Open
cristian-tamblay wants to merge 2 commits into
Open
Migration to uv, added instructions and fixed workflows#756cristian-tamblay wants to merge 2 commits into
cristian-tamblay wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Migrates Python packaging and dependency management from
setup.py+requirements*.txtto a standard PEP 621pyproject.tomlmanaged with uv, adding auv.lockfor reproducible installs across dev, CI, and Docker.Key points:
pip install dashaikeeps working exactly as before.uv sync --extra cpu/--extra cudapick the right PyTorch index automatically via[tool.uv.sources]— this solves the torch-index problem that made us abandonpip-compilein the past (see the old note inrequirements.txt).uv sync --locked), so builds are reproducible and dependency caching is handled bysetup-uv.tests/package (find_packages()had no filter); packages are now scoped toDashAI*.Type of Change
Changes (by file)
pyproject.toml: full PEP 621 metadata (moved fromsetup.prequirements*.txt),cpu/cudaextras with per-extraPyTorch/llama-cpp indexes, dev dependency group. Setuptools reANIFEST.inkeeps bundling the frontend.uv.lock(new): universal lockfile (288 packages, all platfsetup.py,requirements{,-dev,-cpu,-cuda,-plugins}.txt: d.txt` was unreferenced and pinned torch 1.13 from 2022)..github/workflows/build-test.yaml,db-migrations.yaml: `` +uv run ....- `.github/workflows/publish.yml`: `uv build` + `uvx twine`; P--extra cpu --no-dev` and `uv run --no-sync`; release version isnow extracted from `pyproject.toml`.- `.github/workflows/docs.yaml`, `pre-commit.yaml`: install inpip install --system` (the Docusaurus build and a `language:system` hook invoke `python` directly).Dockerfile,Dockerfile.cuda: install withuv sync --locDA image builds llama-cpp withCMAKE_ARGS="-DGGML_CUDA=on"` asbefore.
update-server.sh: uses uv when available, falls back to piREADME.rst,docs/**/dev-setup.md(en/es),CLAUDE.md,uv is the recommended path (includinguv tool install dashai`),pip instructions kept.
Testing
uv run pytest tests/→ 541 passed. - Wheel built withuv buildpassestwine check; verified i,DashAI/alembic, seeds and static images, and no longershipstests/`.uv sync --locked --extra cpuand--extra cudaresolve coend locally; the CUDA llama-cpp compilation is only exercised byDockerfile.cuda, same as before).Notes
DashAI/back/plugins/utils.py) runs in the enduser's env where pip is guaranteed; the AppImage job uses pythupdate-server.sh` falls back to pip if the server lacks uv.[tool.uval and not published to PyPI — pip users still follow the manual--index-url` instructions in the README (unchanged).uv runre-syncs the env to the deuv sync --extra cpu, useuv run --no-syncor re-run thesync.production.