Spaces:
Sleeping
Sleeping
| # Use official Python base image | |
| FROM python:3.10-slim | |
| # App metadata (for Hugging Face Spaces Docker SDK) | |
| LABEL title="MCP Research" | |
| LABEL emoji="๐" | |
| LABEL colorFrom="red" | |
| LABEL colorTo="red" | |
| LABEL sdk="docker" | |
| LABEL app_port="8501" | |
| LABEL tags="streamlit" | |
| LABEL pinned="false" | |
| LABEL short_description="Streamlit template space" | |
| # Set environment variables for permissions and Streamlit config | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV HOME=/app | |
| ENV STREAMLIT_CONFIG_DIR=/app/.streamlit | |
| # Create working directory | |
| WORKDIR /app | |
| # System deps (edit as needed for your MCP servers) | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of your code | |
| COPY . . | |
| # Create .streamlit directory to avoid permission issues | |
| RUN mkdir -p /app/.streamlit | |
| # Optionally, add default Streamlit config (no telemetry, etc) | |
| RUN echo \"[server]\\nheadless = true\\nport = 8501\\naddress = 0.0.0.0\\n\" > /app/.streamlit/config.toml | |
| # Expose Streamlit's default port | |
| EXPOSE 8501 | |
| # Start the Streamlit app | |
| CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] | |