Spaces:
Sleeping
Sleeping
Download Dockerfile from nvalliant/FruitClassifier: direct link, hf CLI and curl.
- Browser
- Download file 582 Bytes
-
https://huggingface.co/spaces/nvalliant/FruitClassifier/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/nvalliant/FruitClassifier/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/nvalliant/FruitClassifier/resolve/main/Dockerfile
582 Bytes
| FROM python:3.10-slim | |
| RUN useradd -m -u 1000 user | |
| USER root | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libgl1 libglib2.0-0 libsm6 libxrender1 libxext6 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| # Force Python to print immediately — critical for HF health checks | |
| ENV PYTHONUNBUFFERED=1 | |
| WORKDIR /app | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY --chown=user server.py . | |
| COPY --chown=user models/ ./models/ | |
| EXPOSE 7860 | |
| CMD ["python", "server.py"] | |