mcp_mcp / Dockerfile
areeb1501
update system
62ea0d0
# Simple Dockerfile for MCP Deployer Server
FROM python:3.12-slim
# Set working directory
WORKDIR /app
# Install system dependencies for Modal CLI
RUN apt-get update && apt-get install -y \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy server file
COPY server.py .
# Create deployments directory and Modal config directory
RUN mkdir -p /app/deployments /root/.modal
# Expose default port (7860 for Hugging Face Spaces)
EXPOSE 7860
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV PORT=7860
# Health check - uses PORT env var
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:${PORT:-7860}/ || exit 1
# Start script to configure Modal and run server
CMD if [ -n "$MODAL_TOKEN_ID" ] && [ -n "$MODAL_TOKEN_SECRET" ]; then \
echo "Configuring Modal authentication..."; \
modal token set --token-id "$MODAL_TOKEN_ID" --token-secret "$MODAL_TOKEN_SECRET"; \
fi && \
echo "Starting MCP Deployer Server..." && \
python server.py