Spaces:
Running
Running
Download Dockerfile from misukisu/moderation-api: direct link, hf CLI and curl.
- Browser
- Download file 532 Bytes
-
https://huggingface.co/spaces/misukisu/moderation-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/misukisu/moderation-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/misukisu/moderation-api/resolve/main/Dockerfile
532 Bytes
| FROM python:3.12-slim | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH PYTHONUNBUFFERED=1 HF_HUB_DISABLE_PROGRESS_BARS=1 | |
| WORKDIR /home/user/app | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir --user -r requirements.txt | |
| COPY --chown=user . . | |
| RUN python -c "from huggingface_hub import snapshot_download as s; s('misukisu/moderation-modernbert-en', allow_patterns=['onnx/model.onnx','tokenizer.json','config.json','thresholds.json'])" | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] | |