From af8f6bf2e1f4c73aeb7be9cd065b5c312c48a828 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 13 Jun 2026 15:49:07 +0000 Subject: [PATCH] Fix Dockerfile: copy src before pip install; set PYTHONPATH --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 58b0fec..5f1ded2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,15 +39,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ poppler-utils \ && rm -rf /var/lib/apt/lists/* -# Install Python dependencies +# Copy project metadata and source before installing COPY pyproject.toml ./ -RUN pip install --upgrade pip && pip install . - -# Copy source COPY src/py_docx ./src/py_docx -# Ensure py_docx is importable -ENV PYTHONPATH="/app/src:${PYTHONPATH}" +# Install Python dependencies (including this package) +RUN pip install --upgrade pip && pip install . + +# Ensure py_docx is importable at runtime +ENV PYTHONPATH="/app/src" # Create runtime dirs RUN mkdir -p /templates /out /tmp/py-docx-mcp