Download Dockerfile from AlainDeLong/Backend-Sentiment-System: direct link, hf CLI and curl.
- Browser
- Download file 365 Bytes
-
https://huggingface.co/spaces/AlainDeLong/Backend-Sentiment-System/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/AlainDeLong/Backend-Sentiment-System/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/AlainDeLong/Backend-Sentiment-System/resolve/main/Dockerfile
365 Bytes
| # use small official image | |
| FROM python:3.11-slim | |
| # set workdir | |
| WORKDIR /app | |
| # copy only requirements first (for cache) | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # copy code | |
| COPY . . | |
| # uvicorn listen on 0.0.0.0:7860 (Spaces default port) | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--proxy-headers"] | |