mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Use UV to install server for speed, package locks in dev setup, workflows
It's much faster than pip, includes dependency locks via uv.lock and comes with standard convenience utilities (e.g pipx, venv replacement)
This commit is contained in:
@@ -29,7 +29,13 @@ if [ "$DEVCONTAINER" = true ]; then
|
||||
# PATH should already include /opt/venv/bin from Dockerfile
|
||||
|
||||
# Install khoj in editable mode (dependencies already installed)
|
||||
python3 -m pip install -e '.[dev]'
|
||||
# Use uv if available, else fall back to pipx
|
||||
if command -v uv &> /dev/null
|
||||
then
|
||||
uv sync --all-extras
|
||||
else
|
||||
python3 -m pip install -e '.[dev]'
|
||||
fi
|
||||
|
||||
# Install Web App using cached dependencies
|
||||
echo "Installing Web App using cached dependencies..."
|
||||
@@ -39,7 +45,14 @@ else
|
||||
# Standard setup
|
||||
echo "Installing Server App..."
|
||||
cd "$PROJECT_ROOT"
|
||||
python3 -m venv .venv && . .venv/bin/activate && python3 -m pip install -e '.[dev]'
|
||||
if command -v uv &> /dev/null
|
||||
then
|
||||
uv venv
|
||||
uv sync --all-extras
|
||||
else
|
||||
python3 -m venv .venv && . .venv/bin/activate
|
||||
python3 -m pip install -e '.[dev]'
|
||||
fi
|
||||
|
||||
echo "Installing Web App..."
|
||||
cd "$PROJECT_ROOT/src/interface/web"
|
||||
|
||||
Reference in New Issue
Block a user