Download Dockerfile from mgbam/MCP_Res: direct link, hf CLI and curl.
- Browser
- Download file 882 Bytes
-
https://huggingface.co/spaces/mgbam/MCP_Res/resolve/ac3658e48d66e4e649fd8b725066df24b3ddd881/Dockerfile
- Command line
-
hf download hf://spaces/mgbam/MCP_Res@ac3658e48d66e4e649fd8b725066df24b3ddd881/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/mgbam/MCP_Res/resolve/ac3658e48d66e4e649fd8b725066df24b3ddd881/Dockerfile
882 Bytes
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Install system dependencies + Streamlit requirements | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| gcc \ | |
| libgomp1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Python dependencies first for caching | |
| COPY requirements.txt . | |
| RUN pip install --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # Verify Streamlit installation | |
| RUN which streamlit && streamlit --version | |
| # Copy application files | |
| COPY . . | |
| # Set up non-root user | |
| RUN useradd -m appuser && chown -R appuser:appuser /app | |
| USER appuser | |
| # Health check (optional but recommended) | |
| HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ | |
| CMD curl -f http://localhost:7860/health || exit 1 | |
| # Run Streamlit | |
| CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.port=7860"] |