Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 7 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
# MCPMark Docker image with optimized layer caching
# Stage 1: Builder for Python dependencies only
FROM python:3.12-slim AS builder

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
g++ \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /build

# Copy and install Python dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir --user -r requirements.txt

# Stage 2: Final image with all runtime dependencies
FROM python:3.12-slim

# Layer 1: Core system dependencies (very stable, rarely changes)
Expand Down Expand Up @@ -67,13 +51,6 @@ RUN apt-get update && \
RUN pip install --no-cache-dir pipx && \
pipx ensurepath

# Layer 7: Copy Python packages from builder (changes with dependencies)
COPY --from=builder /root/.local /root/.local

# Layer 8: Playwright browsers (changes with browser versions)
RUN python3 -m playwright install chromium && \
npx -y playwright install chromium

# Layer 9: Install PostgreSQL MCP server (Python, used via `pipx run postgres-mcp`)
RUN pipx install postgres-mcp

Expand All @@ -86,6 +63,13 @@ RUN mkdir -p /app/results
# Layer 10: Application code (changes frequently)
COPY . .

# Install Python package and dependencies from pyproject (editable mode)
RUN pip install --no-cache-dir -e .

# Install Playwright browsers after Playwright is available
RUN python3 -m playwright install chromium && \
npx -y playwright install chromium

# Set environment
ENV PATH="/root/.local/bin:/root/.local/pipx/venvs/*/bin:${PATH}"
ENV PYTHONPATH="/app"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ See `docs/introduction.md` and the service guides below for more details.

Local (Recommended)
```bash
pip install -e .
pip install --no-cache-dir -e .
# If you'll use browser-based tasks, install Playwright browsers first
playwright install
```
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ dependencies = [
"seaborn>=0.12.0",
"matplotlib>=3.7.0",
"numpy>=1.23.0",
"openai-agents>=0.2.3,<0.3",
"openai==1.96.1",
"openai>1.96.1",
"python-dotenv>=1.1.1,<2",
"ruff>=0.12.4,<0.13",
"psycopg2-binary>=2.9.10,<3",
Expand All @@ -19,7 +18,7 @@ dependencies = [
"pixi",
"pipx>=1.7.1,<2",
"pgdumplib>=3.1.0,<4",
"litellm==1.76.0"
"litellm>=1.76.0"
]

[build-system]
Expand Down
12 changes: 0 additions & 12 deletions requirements.txt

This file was deleted.

1 change: 0 additions & 1 deletion src/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"ratelimit", # e.g., RateLimitError, too many requests
"connection", # connection refused/reset/error
"unavailable", # service unavailable
"execution timed out", # timeout
"internal server error", # 500s
"network error", # generic network issue
"quota", # budget/quota exceeded
Expand Down
Loading