fix: update Dockerfile to use pyproject.toml for dependencies
Some checks failed
Build and Push Monarch MCP Docker Image / build (push) Failing after 10s
Some checks failed
Build and Push Monarch MCP Docker Image / build (push) Failing after 10s
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.
This commit is contained in:
12
Dockerfile
12
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"]
|
||||
|
||||
@@ -25,6 +25,7 @@ dependencies = [
|
||||
"pydantic>=2.0.0",
|
||||
"starlette>=0.35.0",
|
||||
"uvicorn>=0.27.0",
|
||||
"pyotp>=2.9.0",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user