Spaces:
Running
Running
Download Dockerfile from davanstrien/hub-task-tagger: direct link, hf CLI and curl.
- Browser
- Download file 628 Bytes
-
https://huggingface.co/spaces/davanstrien/hub-task-tagger/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/davanstrien/hub-task-tagger/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/davanstrien/hub-task-tagger/resolve/main/Dockerfile
628 Bytes
| FROM python:3.12-slim | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| OMP_NUM_THREADS=2 \ | |
| TORCH_THREADS=2 \ | |
| MODEL_DIR=/home/user/models \ | |
| HF_HUB_DISABLE_TELEMETRY=1 | |
| WORKDIR /home/user/app | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir --user -r requirements.txt | |
| # The model repo is public; no token needed to bake it into the image. | |
| COPY --chown=user download_model.py . | |
| RUN python download_model.py /home/user/models | |
| COPY --chown=user . . | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"] | |