fix(docker): copy uv.lock into build context to pin greenlet version

Without the lock file, uv sync resolves fresh and picks up greenlet
3.4.0 which lacks arm64 wheels for manylinux_2_41, breaking the
multi-arch Docker build.
This commit is contained in:
Nicolò Boschi 2026-04-08 18:21:28 +02:00
parent 27cb7e43e0
commit fa0e63b088

View file

@ -41,9 +41,10 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --no-cache-dir uv
# Copy dependency files and README (required by pyproject.toml)
# Copy dependency files, lock file, and README (required by pyproject.toml)
COPY hindsight-api-slim/pyproject.toml ./api/
COPY hindsight-api-slim/README.md ./api/
COPY uv.lock ./api/
WORKDIR /app/api
@ -51,9 +52,9 @@ WORKDIR /app/api
# local-ml: torch, sentence-transformers, transformers, einops, flashrank, mlx (optional)
# embedded-db: pg0-embedded (always included for embedded PostgreSQL support)
RUN if [ "$INCLUDE_LOCAL_MODELS" = "true" ]; then \
uv sync --extra local-ml --extra embedded-db; \
uv sync --frozen --extra local-ml --extra embedded-db; \
else \
uv sync --extra embedded-db; \
uv sync --frozen --extra embedded-db; \
fi
# Copy source code (alembic migrations are inside hindsight_api/)