Switch Docker base from alpine to debian-slim for torch compatibility

torch/sentence-transformers only provide manylinux (glibc) wheels,
not musl. The musl-compiled tori binary is statically linked and
runs fine on glibc systems.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-01 08:38:49 +00:00
parent db8f6cb500
commit 3d1c910c4a

View File

@@ -6,9 +6,9 @@ RUN npm ci
COPY web/ ./ COPY web/ ./
RUN npm run build RUN npm run build
# Stage 2: Runtime # Stage 2: Runtime (debian for glibc — torch/sentence-transformers need manylinux wheels)
FROM alpine:3.21 FROM debian:bookworm-slim
RUN apk add --no-cache ca-certificates curl bash RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && rm -rf /var/lib/apt/lists/*
RUN curl -LsSf https://astral.sh/uv/install.sh | sh RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH" ENV PATH="/root/.local/bin:$PATH"
RUN uv venv --python 3.12 /app/venv && uv pip install --python /app/venv/bin/python sentence-transformers RUN uv venv --python 3.12 /app/venv && uv pip install --python /app/venv/bin/python sentence-transformers