migrate to uv + pyproject.toml

- root pyproject.toml replaces requirements.txt and requirements-worker.txt
  (worker = root + ffmpeg-python which root already had); test deps moved
  to [dependency-groups] dev
- core/gpu/pyproject.toml replaces core/gpu/requirements.txt; uses
  [tool.uv.sources] to pin torch/torchvision and paddlepaddle-gpu to their
  CUDA index URLs, replacing the manual reinstall dance from old comments
- Dockerfiles use uv sync --frozen against uv.lock for reproducible builds;
  PATH includes /app/.venv/bin so k8s manifests' bare uvicorn/celery
  commands resolve without wrapping in uv run
- core/gpu/run.sh local mode now does uv sync + uv run python server.py;
  errors out cleanly if uv is missing
This commit is contained in:
2026-04-29 07:32:56 -03:00
parent d9e0794b83
commit f66d3a273f
10 changed files with 3132 additions and 93 deletions

View File

@@ -8,8 +8,11 @@ RUN apt-get update && apt-get install -y \
WORKDIR /app
COPY requirements.txt .
RUN uv pip install --system --no-cache -r requirements.txt
ENV PATH="/app/.venv/bin:$PATH"
# uv.lock is generated on first build (dev box can't reach paddlepaddle's index)
COPY pyproject.toml ./
RUN uv sync --no-install-project --no-dev
COPY . .