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).
This commit is contained in:
parent
fa0e63b088
commit
e82bc56580
2 changed files with 8 additions and 4 deletions
|
|
@ -41,21 +41,23 @@ RUN apt-get update && apt-get install -y \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& pip install --no-cache-dir uv
|
&& 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/pyproject.toml ./api/
|
||||||
COPY hindsight-api-slim/README.md ./api/
|
COPY hindsight-api-slim/README.md ./api/
|
||||||
COPY uv.lock ./api/
|
COPY docker/standalone/constraints.txt /tmp/constraints.txt
|
||||||
|
|
||||||
WORKDIR /app/api
|
WORKDIR /app/api
|
||||||
|
|
||||||
# Sync dependencies using appropriate extras based on INCLUDE_LOCAL_MODELS
|
# Sync dependencies using appropriate extras based on INCLUDE_LOCAL_MODELS
|
||||||
# local-ml: torch, sentence-transformers, transformers, einops, flashrank, mlx (optional)
|
# local-ml: torch, sentence-transformers, transformers, einops, flashrank, mlx (optional)
|
||||||
# embedded-db: pg0-embedded (always included for embedded PostgreSQL support)
|
# embedded-db: pg0-embedded (always included for embedded PostgreSQL support)
|
||||||
|
ENV UV_CONSTRAINT=/tmp/constraints.txt
|
||||||
RUN if [ "$INCLUDE_LOCAL_MODELS" = "true" ]; then \
|
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 \
|
else \
|
||||||
uv sync --frozen --extra embedded-db; \
|
uv sync --extra embedded-db; \
|
||||||
fi
|
fi
|
||||||
|
ENV UV_CONSTRAINT=
|
||||||
|
|
||||||
# Copy source code (alembic migrations are inside hindsight_api/)
|
# Copy source code (alembic migrations are inside hindsight_api/)
|
||||||
COPY hindsight-api-slim/hindsight_api ./hindsight_api
|
COPY hindsight-api-slim/hindsight_api ./hindsight_api
|
||||||
|
|
|
||||||
2
docker/standalone/constraints.txt
Normal file
2
docker/standalone/constraints.txt
Normal file
|
|
@ -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
|
||||||
Loading…
Reference in a new issue