Support uv for environment setup and dependency install - #384
Merged
Merged
Conversation
Detect uv in install.sh and in the in-app updater: create the venv with 'uv venv --seed' and install requirements with 'uv pip install --python' when uv is on PATH, falling back to the existing python -m venv / pip flow. Document the uv workflow in AGENTS.md and CONTRIBUTING.md.
Mention uv as an automatic alternative to pip/venv in the requirements and the manual install steps.
thomas9120
approved these changes
Sep 16, 2026
thomas9120
left a comment
Owner
There was a problem hiding this comment.
small clarification needed regarding windows install via bat file, it wouldn't use uv but the in-app updater would on Windows. I can make these changes post merge.
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
Allow the LLama GUI venv to be created and its dependencies installed with
uv when it is available, while keeping the
existing
python -m venv+pipflow as a fallback.Changes
install.sh: detectuvon PATH; create the venv withuv venv --seed --python "$PY_CMD"and install requirements withuv pip install --python "$VENV_PYTHON" -r requirements.txt. Falls back topython -m venv/pipwhen uv is absent.backend/services/git_update.py: newdependency_install_command()used by the in-app updater (
install_python_dependencies). Prefersuv pip install --python <sys.executable> -r requirements.txtwhen uv is onPATH, else the previous
sys.executable -m pip install -r requirements.txt.AGENTS.md/CONTRIBUTING.md: document the uv workflow, and why--seed/ pip-in-venv must be preserved forinstall.shand the updater.Why uv +
--seeduv venvwithout--seedproduces a venv with no pip; bothinstall.shand the in-app updater assume pip exists in the venv.pyproject.toml, so dependencies are managed withuv pip install -r requirements.txt(notuv sync).Tests
Ran with the project venv:
python -m unittest discover tests -v— 825 tests OK (includes two newtests covering the uv-preference and pip-fallback branches.
tests/backend/test_docs_links.pyandtest_docs_sync.py— OK.