Browse Source

fix: update Dockerfiles to improve base image configurations and dependency installations

myhloli 6 days ago
parent
commit
86b1fca74c
3 changed files with 14 additions and 4 deletions
  1. 12 2
      docker/china/maca.Dockerfile
  2. 1 1
      docker/china/npu.Dockerfile
  3. 1 1
      docker/china/ppu.Dockerfile

+ 12 - 2
docker/china/maca.Dockerfile

@@ -1,5 +1,8 @@
+# 基础镜像配置 vLLM 或 LMDeploy 推理环境,请根据实际需要选择其中一个,要求 amd64(x86-64) CPU + metax GPU。
+# Base image containing the vLLM inference environment, requiring amd64(x86-64) CPU + metax GPU.
+FROM cr.metax-tech.com/public-ai-release/maca/vllm:maca.ai3.1.0.7-torch2.6-py310-ubuntu22.04-amd64
 # Base image containing the LMDeploy inference environment, requiring amd64(x86-64) CPU + metax GPU.
-FROM
+# FROM
 
 # Install libgl for opencv support & Noto fonts for Chinese characters
 RUN apt-get update && \
@@ -12,8 +15,15 @@ RUN apt-get update && \
     apt-get clean && \
     rm -rf /var/lib/apt/lists/*
 
+# mod torchvision to be compatible with torch 2.6
+RUN mv /opt/conda/lib/python3.10/site-packages/torchvision-0.15.1+metax3.1.0.4.dist-info /opt/conda/lib/python3.10/site-packages/torchvision-0.21.0+metax3.1.0.4.dist-info
+
 # Install mineru latest
-RUN python3 -m pip install -U 'mineru[core]' -i https://mirrors.aliyun.com/pypi/simple --break-system-packages && \
+RUN python3 -m pip install -U pip -i https://mirrors.aliyun.com/pypi/simple && \
+    python3 -m pip install 'mineru[core]>=2.6.5' \
+                            numpy==1.26.4 \
+                            opencv-python==4.11.0.86 \
+                            -i https://mirrors.aliyun.com/pypi/simple && \
     python3 -m pip cache purge
 
 # Download models and update the configuration file

+ 1 - 1
docker/china/npu.Dockerfile

@@ -1,4 +1,4 @@
-# 基础镜像配置 vLLM 或 LMDeploy 推理环境选择其中一个,要求 ARM(AArch64) CPU + Ascend NPU。
+# 基础镜像配置 vLLM 或 LMDeploy ,请根据实际需要选择其中一个,要求 ARM(AArch64) CPU + Ascend NPU。
 # Base image containing the vLLM inference environment, requiring ARM(AArch64) CPU + Ascend NPU.
 FROM quay.io/ascend/vllm-ascend:v0.11.0rc1
 # Base image containing the LMDeploy inference environment, requiring ARM(AArch64) CPU + Ascend NPU.

+ 1 - 1
docker/china/ppu.Dockerfile

@@ -1,4 +1,4 @@
-# 基础镜像配置 vLLM 或 LMDeploy 推理环境选择其中一个,要求 amd64(x86-64) CPU + t-head PPU。
+# 基础镜像配置 vLLM 或 LMDeploy 推理环境,请根据实际需要选择其中一个,要求 amd64(x86-64) CPU + t-head PPU。
 # Base image containing the vLLM inference environment, requiring amd64(x86-64) CPU + t-head PPU.
 FROM crpi-vofi3w62lkohhxsp.cn-shanghai.personal.cr.aliyuncs.com/opendatalab-mineru/ppu:ppu-pytorch2.6.0-ubuntu24.04-cuda12.6-vllm0.8.5-py312
 # Base image containing the LMDeploy inference environment, requiring amd64(x86-64) CPU + t-head PPU.