# The Space builds this. It exists because the Gradio SDK forces # gradio[oauth,mcp], whose mcp extra pins mcp<2.0, while fastmcp 4 needs # mcp>=2.3 - an unresolvable conflict. Plain gradio has no such pin, so # owning the image is simpler than fighting the resolver. # # Dockerfile.mcp-server is the other one: the thin MCP client a harness runs. FROM python:3.12-slim RUN useradd -m -u 1000 user USER user ENV PATH=/home/user/.local/bin:$PATH \ GRADIO_SERVER_NAME=0.0.0.0 \ GRADIO_SERVER_PORT=7860 \ PYTHONUNBUFFERED=1 WORKDIR /home/user/app COPY --chown=user requirements.txt ./ RUN pip install --no-cache-dir --user -r requirements.txt COPY --chown=user . . EXPOSE 7860 CMD ["python", "app.py"]