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