Skip to content

Commit e82bc56

Browse files
committed
fix(docker): constrain greenlet<3.4.0 for arm64 Docker builds
greenlet 3.4.0 lacks manylinux_2_41_aarch64 wheels. Use a UV_CONSTRAINT file instead of the workspace lock file (which doesn't work in the single-package Docker context).
1 parent fa0e63b commit e82bc56

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

docker/standalone/Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,23 @@ RUN apt-get update && apt-get install -y \
4141
&& rm -rf /var/lib/apt/lists/* \
4242
&& pip install --no-cache-dir uv
4343

44-
# Copy dependency files, lock file, and README (required by pyproject.toml)
44+
# Copy dependency files and README (required by pyproject.toml)
4545
COPY hindsight-api-slim/pyproject.toml ./api/
4646
COPY hindsight-api-slim/README.md ./api/
47-
COPY uv.lock ./api/
47+
COPY docker/standalone/constraints.txt /tmp/constraints.txt
4848

4949
WORKDIR /app/api
5050

5151
# Sync dependencies using appropriate extras based on INCLUDE_LOCAL_MODELS
5252
# local-ml: torch, sentence-transformers, transformers, einops, flashrank, mlx (optional)
5353
# embedded-db: pg0-embedded (always included for embedded PostgreSQL support)
54+
ENV UV_CONSTRAINT=/tmp/constraints.txt
5455
RUN if [ "$INCLUDE_LOCAL_MODELS" = "true" ]; then \
55-
uv sync --frozen --extra local-ml --extra embedded-db; \
56+
uv sync --extra local-ml --extra embedded-db; \
5657
else \
57-
uv sync --frozen --extra embedded-db; \
58+
uv sync --extra embedded-db; \
5859
fi
60+
ENV UV_CONSTRAINT=
5961

6062
# Copy source code (alembic migrations are inside hindsight_api/)
6163
COPY hindsight-api-slim/hindsight_api ./hindsight_api

docker/standalone/constraints.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# greenlet 3.4.0 lacks arm64 wheels for manylinux_2_41 — remove this cap once 3.4.1+ ships with them
2+
greenlet<3.4.0

0 commit comments

Comments
 (0)