ppu.Dockerfile 1.5 KB

123456789101112131415161718192021222324252627282930
  1. # 基础镜像配置 vLLM 或 LMDeploy 推理环境,请根据实际需要选择其中一个,要求 amd64(x86-64) CPU + t-head PPU。
  2. # Base image containing the vLLM inference environment, requiring amd64(x86-64) CPU + t-head PPU.
  3. FROM crpi-vofi3w62lkohhxsp.cn-shanghai.personal.cr.aliyuncs.com/opendatalab-mineru/ppu:ppu-pytorch2.6.0-ubuntu24.04-cuda12.6-vllm0.8.5-py312
  4. # Base image containing the LMDeploy inference environment, requiring amd64(x86-64) CPU + t-head PPU.
  5. # FROM crpi-4crprmm5baj1v8iv.cn-hangzhou.personal.cr.aliyuncs.com/lmdeploy_dlinfer/ppu:mineru-ppu
  6. # Install libgl for opencv support & Noto fonts for Chinese characters
  7. RUN apt-get update && \
  8. apt-get install -y \
  9. fonts-noto-core \
  10. fonts-noto-cjk \
  11. fontconfig \
  12. libgl1 && \
  13. fc-cache -fv && \
  14. apt-get clean && \
  15. rm -rf /var/lib/apt/lists/*
  16. # Install mineru latest
  17. RUN python3 -m pip install -U pip -i https://mirrors.aliyun.com/pypi/simple && \
  18. python3 -m pip install 'mineru[core]>=2.6.5' \
  19. numpy==1.26.4 \
  20. opencv-python==4.11.0.86 \
  21. -i https://mirrors.aliyun.com/pypi/simple && \
  22. python3 -m pip cache purge
  23. # Download models and update the configuration file
  24. RUN /bin/bash -c "mineru-models-download -s modelscope -m all"
  25. # Set the entry point to activate the virtual environment and run the command line tool
  26. ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]