Spaces:
Runtime error
Runtime error
Download Dockerfile from LeoAmir/digit-classifier: direct link, hf CLI and curl.
- Browser
- Download file 485 Bytes
-
https://huggingface.co/spaces/LeoAmir/digit-classifier/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/LeoAmir/digit-classifier/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/LeoAmir/digit-classifier/resolve/main/Dockerfile
485 Bytes
| # syntax=docker/dockerfile:1 | |
| FROM python:3.10-slim | |
| WORKDIR /app | |
| COPY backend/requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip setuptools wheel \ | |
| && pip install --no-cache-dir -r requirements.txt | |
| COPY backend ./backend | |
| COPY frontend ./frontend | |
| # ensure model dir exists and train the model during build | |
| RUN mkdir -p model | |
| RUN python backend/train.py | |
| ENV PORT=7860 | |
| ENV TF_CPP_MIN_LOG_LEVEL=2 | |
| CMD ["uvicorn", "backend.app:app", "--host", "0.0.0.0", "--port", "7860"] | |