From 1d2bf199e1d3108b5d33b7f91e8fe24a548b0d2c Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 24 Dec 2025 21:41:04 +0000 Subject: [PATCH] fix: update Dockerfile to use pyproject.toml for dependencies Change from requirements.txt to pyproject.toml as source of truth for dependencies. This ensures pyotp is properly installed in the Docker image when built. Using 'uv pip install -e .' will install the package with all dependencies from pyproject.toml. --- Dockerfile | 12 ++++++------ pyproject.toml | 1 + requirements.txt | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 157d7ac..99764d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,11 +6,11 @@ WORKDIR /app # Install uv for fast dependency management RUN pip install uv -# Copy only requirements first to leverage Docker cache -COPY requirements.txt . +# Copy pyproject.toml first to leverage Docker cache +COPY pyproject.toml . -# Install dependencies into the system python environment of the builder -RUN uv pip install --system -r requirements.txt +# Install dependencies into system python environment of builder +RUN uv pip install --system -e . # Stage 2: Final Image FROM python:3.12-slim @@ -31,11 +31,11 @@ COPY src/ ./src/ COPY pyproject.toml . COPY README.md . -# Set Python path to find the package +# Set Python path to find package ENV PYTHONPATH=/app/src # Default port EXPOSE 8000 -# Run the server +# Run server CMD ["python", "src/monarch_mcp_custom/server.py"] diff --git a/pyproject.toml b/pyproject.toml index e663738..49bc68a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,6 +25,7 @@ dependencies = [ "pydantic>=2.0.0", "starlette>=0.35.0", "uvicorn>=0.27.0", + "pyotp>=2.9.0", ] [project.scripts] diff --git a/requirements.txt b/requirements.txt index a5ec78d..835949c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -mcp[cli]>=1.0.0 fastmcp>=0.4.1 monarchmoney>=0.1.15 gql>=3.4,<4.0 @@ -6,3 +5,4 @@ python-dotenv>=1.0.0 pydantic>=2.0.0 starlette>=0.35.0 uvicorn>=0.27.0 +pyotp==2.9.0