forked from hummingbot/mcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (26 loc) · 880 Bytes
/
Dockerfile
File metadata and controls
31 lines (26 loc) · 880 Bytes
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
# Stage 1: Dependencies
FROM python:3.12-slim AS deps
WORKDIR /app
RUN apt-get update && apt-get install -y git && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
pip install uv
COPY pyproject.toml uv.lock README.md main.py ./
COPY hummingbot_mcp/ ./hummingbot_mcp/
RUN uv venv && uv pip install .
# Stage 2: Runtime
FROM python:3.12-slim
WORKDIR /app
RUN apt-get update && apt-get install -y git && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
pip install uv
# Copy the virtual environment from the deps stage
COPY --from=deps /app/.venv /app/.venv
# Copy source code
COPY hummingbot_mcp/ ./hummingbot_mcp/
COPY README.md ./
COPY main.py ./
COPY pyproject.toml ./
# Set environment variable to indicate we're running in Docker
ENV DOCKER_CONTAINER=true
# Run the MCP server using the pre-built venv
ENTRYPOINT ["/app/.venv/bin/python", "main.py"]