File size: 858 Bytes
5844a76
 
 
 
 
 
 
 
 
 
 
 
1ab614e
 
5844a76
1ab614e
5844a76
1ab614e
 
5844a76
1ab614e
5844a76
 
 
 
1ab614e
 
 
5844a76
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
# Dockerfile — DemoPrep MCP Space (Hugging Face Docker Space)
#
# Runs the MCP server (mcp_server.py) over streamable-HTTP on port 7860.
# This is a SEPARATE Space from the Gradio app: same codebase, different
# entrypoint. Business logic stays in one place (demoprep_app/) — this Space
# just runs the MCP adapter instead of the Gradio UI.
#
# Required secrets: set in Space Settings -> Repository Secrets (see the
# mcp_server.py module docstring for the full list).
FROM python:3.11-slim

RUN useradd -m -u 1000 user
WORKDIR /app

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

COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY --chown=user . .

USER user
ENV MCP_TRANSPORT=http \
    MCP_HTTP_PORT=7860 \
    HOME=/home/user

EXPOSE 7860

CMD ["python", "mcp_server.py"]