forked from sdiehl/sympy-mcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 1.05 KB
/
Copy pathDockerfile
File metadata and controls
32 lines (22 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM python:3.12-slim
WORKDIR /app
# Install system dependencies including git (required for uv git dependencies)
RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates git
# Download the latest installer
ADD https://astral.sh/uv/install.sh /uv-installer.sh
# Run the installer then remove it
RUN sh /uv-installer.sh && rm /uv-installer.sh
# Ensure the installed binary is on the `PATH`
ENV PATH="/root/.local/bin/:$PATH"
# Copy dependency files first — layer cache means deps only reinstall when these change
COPY pyproject.toml uv.lock README.md ./
COPY sympy_mcp/ ./sympy_mcp/
# Pre-install all dependencies at build time (no installs at container startup)
RUN uv sync --frozen --no-dev
# Expose the default MCP port
EXPOSE 8081
# Add healthcheck
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8081/health || exit 1
# Run the server in rest mode (REST API + MCP over HTTP)
CMD ["uv", "run", "sympy-mcp", "--mode", "rest", "--host", "0.0.0.0", "--port", "8081", "--no-auth"]