Download Dockerfile from mgbam/MCP_Res: direct link, hf CLI and curl.
- Browser
- Download file 922 Bytes
-
https://huggingface.co/spaces/mgbam/MCP_Res/resolve/150c01163c6e9e8177b578634cc7a62d3ce8b58e/Dockerfile
- Command line
-
hf download hf://spaces/mgbam/MCP_Res@150c01163c6e9e8177b578634cc7a62d3ce8b58e/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/mgbam/MCP_Res/resolve/150c01163c6e9e8177b578634cc7a62d3ce8b58e/Dockerfile
922 Bytes
| # Use the official Python 3.10 slim image as the base | |
| FROM python:3.10-slim | |
| # Set environment variables to ensure consistent behavior | |
| ENV PYTHONUNBUFFERED=1 \ | |
| STREAMLIT_BROWSER_GATHER_USAGE_STATS=false \ | |
| STREAMLIT_SERVER_HEADLESS=true \ | |
| STREAMLIT_HOME=/tmp/.streamlit | |
| # Create the .streamlit directory with appropriate permissions | |
| RUN mkdir -p $STREAMLIT_HOME && chmod -R 755 $STREAMLIT_HOME | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # Copy only the requirements file first to leverage Docker cache | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir --upgrade pip \ | |
| && pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the application code | |
| COPY . . | |
| # Expose the port Streamlit will run on | |
| EXPOSE 8501 | |
| # Define the command to run the Streamlit app | |
| CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] | |