Spaces:
Sleeping
Sleeping
File size: 532 Bytes
92fc1be | 1 2 3 4 5 6 7 8 9 10 11 12 | 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"]
|