Dockerfile 1.1 KB

1234567891011121314151617181920212223242526
  1. FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
  2. WORKDIR /app
  3. EXPOSE 7860
  4. ENV PYTHONUNBUFFERED=1
  5. # Download all required fonts
  6. ADD "https://github.com/satbyy/go-noto-universal/releases/download/v7.0/GoNotoKurrent-Regular.ttf" /app/
  7. ADD "https://github.com/timelic/source-han-serif/releases/download/main/SourceHanSerifCN-Regular.ttf" /app/
  8. ADD "https://github.com/timelic/source-han-serif/releases/download/main/SourceHanSerifTW-Regular.ttf" /app/
  9. ADD "https://github.com/timelic/source-han-serif/releases/download/main/SourceHanSerifJP-Regular.ttf" /app/
  10. ADD "https://github.com/timelic/source-han-serif/releases/download/main/SourceHanSerifKR-Regular.ttf" /app/
  11. RUN apt-get update && \
  12. apt-get install --no-install-recommends -y libgl1 libglib2.0-0 && \
  13. rm -rf /var/lib/apt/lists/* && uv pip install --system --no-cache huggingface-hub && \
  14. python3 -c "from huggingface_hub import hf_hub_download; hf_hub_download('wybxc/DocLayout-YOLO-DocStructBench-onnx','doclayout_yolo_docstructbench_imgsz1024.onnx');"
  15. COPY . .
  16. RUN uv pip install --system --no-cache .
  17. CMD ["pdf2zh", "-i"]