test-demoprep / Dockerfile
mikeboone's picture
feat: MCP server + HF Docker Space config for AgentSpot
5844a76
Raw
History Blame Contribute Delete
858 Bytes
# 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"]