|
|
@@ -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
|