Spaces:
Sleeping
Sleeping
Download Dockerfile from Johdw/final-working-api: direct link, hf CLI and curl.
- Browser
- Download file 532 Bytes
-
https://huggingface.co/spaces/Johdw/final-working-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Johdw/final-working-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Johdw/final-working-api/resolve/main/Dockerfile
532 Bytes
| # THE FINAL, CORRECT BLUEPRINT. THIS WILL WORK. | |
| FROM python:3.10-slim | |
| # Set up a writable directory for our model | |
| RUN mkdir -p /app/data && chown -R 1000:1000 /app | |
| WORKDIR /app | |
| # Copy and install the lightweight requirements | |
| COPY --chown=1000:1000 requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the API code | |
| COPY --chown=1000:1000 main.py . | |
| # Explicitly run as the non-root 'user' | |
| USER 1000 | |
| # The simple, reliable startup command. | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |