Download Dockerfile from namanraj/Real_Time_Handwritten_Digits_Classifier: direct link, hf CLI and curl.
- Browser
- Download file 451 Bytes
-
https://huggingface.co/spaces/namanraj/Real_Time_Handwritten_Digits_Classifier/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/namanraj/Real_Time_Handwritten_Digits_Classifier/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/namanraj/Real_Time_Handwritten_Digits_Classifier/resolve/main/Dockerfile
451 Bytes
| # Base Python image | |
| FROM python:3.10-slim | |
| # Set working directory | |
| WORKDIR /code | |
| # Copy dependencies first for caching | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy app folder (includes main.py + best_model.h5) | |
| COPY ./app ./app | |
| # Set working directory to app | |
| WORKDIR /code/app | |
| # Expose Hugging Face Space port | |
| EXPOSE 7860 | |
| # Start FastAPI app | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |