Spaces:
Runtime error
Runtime error
Download Dockerfile from saann/shoptracker: direct link, hf CLI and curl.
- Browser
- Download file 582 Bytes
-
https://huggingface.co/spaces/saann/shoptracker/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/saann/shoptracker/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/saann/shoptracker/resolve/main/Dockerfile
582 Bytes
| # Hugging Face Spaces Docker deployment | |
| # Port must be 7860 for HF Spaces | |
| FROM python:3.12 | |
| # Create non-root user (HF Spaces requirement) | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| WORKDIR /app | |
| # Copy and install requirements first (for Docker cache) | |
| COPY --chown=user requirements.txt requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # Copy entire backend folder | |
| COPY --chown=user . /app | |
| # Start FastAPI on port 7860 (HF Spaces requirement) | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |