Dockerfile: --force-reinstall on app pip install (otherwise click stays in /root/.local from pipx bootstrap and uvicorn can't see it)

This commit is contained in:
Kayos 2026-04-29 15:10:57 -07:00
parent 70d6df2414
commit 80c4eebf3b

View file

@ -287,7 +287,11 @@ RUN chmod +x /usr/local/bin/smoke.sh
# 21. Application — FastAPI + async runner (wave 1: steps 2+3+4) # 21. Application — FastAPI + async runner (wave 1: steps 2+3+4)
# ============================================================ # ============================================================
COPY pyproject.toml requirements.txt /app/ COPY pyproject.toml requirements.txt /app/
RUN pip install --break-system-packages --no-cache-dir -r /app/requirements.txt # --force-reinstall is the critical flag: without it, pip skips packages
# already in /root/.local/ (left there by the earlier pipx bootstrap as
# USER root). uvicorn under /usr/local/bin needs them in
# /usr/local/lib/python3.11/dist-packages, so force the system install.
RUN pip install --break-system-packages --no-cache-dir --force-reinstall -r /app/requirements.txt
COPY --chown=crafter:crafter crafting_table /app/crafting_table COPY --chown=crafter:crafter crafting_table /app/crafting_table
RUN chown -R crafter:crafter /app RUN chown -R crafter:crafter /app