# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Default image command: FastAPI + Swagger/ReDoc + Streamable HTTP MCP at /mcp (agent-friendly).
# Stdio MCP: docker run ... python server.py --transport stdio
# Smithery overrides the container command with python server.py (see smithery.yaml).
# Runtime image tracks latest supported CPython (3.14). CI tests 3.12 and 3.14; pin to python:3.12-slim if you need the older baseline only.
FROM python:3.14-slim

WORKDIR /app

RUN apt-get update && apt-get install -y \
    graphviz \
    curl \
    git \
    && rm -rf /var/lib/apt/lists/*

# Installs derive from the lockfile to avoid requirements drift.
COPY . .
RUN pip install --no-cache-dir uv \
    && uv export --frozen --no-dev --no-hashes -o /tmp/requirements.lock.txt \
    && uv pip install --system --no-compile --no-cache-dir -r /tmp/requirements.lock.txt \
    && rm -f /tmp/requirements.lock.txt

RUN mkdir -p /app/output

EXPOSE 8000

ENV FASTMCP_STATELESS_HTTP=true

CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
