Download Dockerfile from rameshmoorthy/Customs_SelfLearning_RMS_1: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/spaces/rameshmoorthy/Customs_SelfLearning_RMS_1/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/rameshmoorthy/Customs_SelfLearning_RMS_1/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/rameshmoorthy/Customs_SelfLearning_RMS_1/resolve/main/Dockerfile
1.1 kB
| FROM python:3.11-slim | |
| # Use Python 3.11 - has pre-built wheels for ALL packages, no compilation needed | |
| # 3.13 causes pandas/numpy source compilation which fails | |
| WORKDIR /app | |
| # Install system deps | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy and install requirements FIRST (Docker layer cache) | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # Copy app files | |
| COPY . . | |
| # Create non-root user (HuggingFace requirement) | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| EXPOSE 7860 | |
| # Run streamlit with file watcher disabled to prevent restart loop | |
| ENTRYPOINT ["streamlit", "run", "app.py", \ | |
| "--server.port=7860", \ | |
| "--server.address=0.0.0.0", \ | |
| "--server.headless=true", \ | |
| "--server.fileWatcherType=none", \ | |
| "--server.runOnSave=false", \ | |
| "--browser.gatherUsageStats=false", \ | |
| "--server.enableCORS=false", \ | |
| "--server.enableXsrfProtection=false"] | |