Dockerfile.mcp_hostโข759 B
# Dockerfile for MCP Host (Agent Host)
FROM python:3.13-slim
WORKDIR /app
# Install system dependencies required for building Python packages
RUN apt-get update && apt-get install -y \
gcc \
g++ \
make \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
# Copy dependency files
COPY pyproject.toml ./
# Install dependencies using uv
RUN uv pip install --system --no-cache -r pyproject.toml
# Copy the application code
COPY . .
# Expose the FastAPI port
EXPOSE 8000
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
# Run the MCP host application
CMD ["sh", "-c", "alembic upgrade head && uvicorn mcp_host.main:app --host 0.0.0.0 --port 8000"]