fix: set PYTHONPATH=/app in Dockerfile for dashboard imports

Streamlit adds the script directory to sys.path, not the working
directory, so dashboard/ wasn't importable as a package.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-04-01 15:38:31 -07:00
parent c080f8de74
commit 20392e824f
1 changed files with 1 additions and 0 deletions

View File

@ -7,6 +7,7 @@ RUN pip install --no-cache-dir ".[dashboard]"
FROM python:3.12-slim FROM python:3.12-slim
WORKDIR /app WORKDIR /app
ENV PYTHONPATH=/app
RUN useradd --create-home appuser RUN useradd --create-home appuser
COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
COPY --from=builder /usr/local/bin /usr/local/bin COPY --from=builder /usr/local/bin /usr/local/bin