From e82bc56580665d625987a25e1841376f8a906b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Boschi?= Date: Wed, 8 Apr 2026 18:34:05 +0200 Subject: [PATCH] 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). --- docker/standalone/Dockerfile | 10 ++++++---- docker/standalone/constraints.txt | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 docker/standalone/constraints.txt diff --git a/docker/standalone/Dockerfile b/docker/standalone/Dockerfile index 6072f235..362d8b72 100644 --- a/docker/standalone/Dockerfile +++ b/docker/standalone/Dockerfile @@ -41,21 +41,23 @@ RUN apt-get update && apt-get install -y \ && rm -rf /var/lib/apt/lists/* \ && pip install --no-cache-dir uv -# Copy dependency files, lock file, and README (required by pyproject.toml) +# Copy dependency files and README (required by pyproject.toml) COPY hindsight-api-slim/pyproject.toml ./api/ COPY hindsight-api-slim/README.md ./api/ -COPY uv.lock ./api/ +COPY docker/standalone/constraints.txt /tmp/constraints.txt WORKDIR /app/api # Sync dependencies using appropriate extras based on INCLUDE_LOCAL_MODELS # local-ml: torch, sentence-transformers, transformers, einops, flashrank, mlx (optional) # embedded-db: pg0-embedded (always included for embedded PostgreSQL support) +ENV UV_CONSTRAINT=/tmp/constraints.txt RUN if [ "$INCLUDE_LOCAL_MODELS" = "true" ]; then \ - uv sync --frozen --extra local-ml --extra embedded-db; \ + uv sync --extra local-ml --extra embedded-db; \ else \ - uv sync --frozen --extra embedded-db; \ + uv sync --extra embedded-db; \ fi +ENV UV_CONSTRAINT= # Copy source code (alembic migrations are inside hindsight_api/) COPY hindsight-api-slim/hindsight_api ./hindsight_api diff --git a/docker/standalone/constraints.txt b/docker/standalone/constraints.txt new file mode 100644 index 00000000..f34de675 --- /dev/null +++ b/docker/standalone/constraints.txt @@ -0,0 +1,2 @@ +# greenlet 3.4.0 lacks arm64 wheels for manylinux_2_41 — remove this cap once 3.4.1+ ships with them +greenlet<3.4.0