Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

feat: update Dockerfiles to conditionally install qwen-vl-utils based on backend

myhloli7c4ccdd18969
diff --git a/docker/china/maca.Dockerfile b/docker/china/maca.Dockerfile
index 827f18c6..938896cf 100644
--- a/docker/china/maca.Dockerfile
+++ b/docker/china/maca.Dockerfile
@@ -3,6 +3,7 @@
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 crpi-vofi3w62lkohhxsp.cn-shanghai.personal.cr.aliyuncs.com/opendatalab-mineru/maca:maca.ai3.1.0.7-torch2.6-py310-ubuntu22.04-lmdeploy0.10.2-amd64
+# ARG BACKEND=lmdeploy
# Install libgl for opencv support & Noto fonts for Chinese characters
RUN apt-get update && \
@@ -25,10 +26,13 @@ RUN /opt/conda/bin/python3 -m pip install -U pip -i https://mirrors.aliyun.com/p
numpy==1.26.4 \
opencv-python==4.11.0.86 \
-i https://mirrors.aliyun.com/pypi/simple && \
+ if [ "$BACKEND" = "lmdeploy" ]; then \
+ /opt/conda/bin/python3 -m pip install 'qwen-vl-utils>=0.0.14,<1' -i https://mirrors.aliyun.com/pypi/simple; \
+ fi && \
/opt/conda/bin/python3 -m pip cache purge
# Download models and update the configuration file
RUN /bin/bash -c "/opt/conda/bin/mineru-models-download -s modelscope -m all"
# Set the entry point to activate the virtual environment and run the command line tool
-ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]
\ No newline at end of file
+ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]
diff --git a/docker/china/mlu.Dockerfile b/docker/china/mlu.Dockerfile
index bd889a91..09174e1c 100644
--- a/docker/china/mlu.Dockerfile
+++ b/docker/china/mlu.Dockerfile
@@ -26,7 +26,9 @@ RUN /bin/bash -c '\
numpy==1.26.4 \
opencv-python==4.11.0.86 \
-i https://mirrors.aliyun.com/pypi/simple && \
- python3 -m pip install $(if [ "$BACKEND" = "lmdeploy" ]; then echo "accelerate==1.2.0"; else echo "transformers==4.50.3"; fi) && \
+ python3 -m pip install \
+ $(if [ "$BACKEND" = "lmdeploy" ]; then echo "qwen-vl-utils>=0.0.14,<1 accelerate==1.2.0"; else echo "transformers==4.50.3"; fi) \
+ -i https://mirrors.aliyun.com/pypi/simple && \
python3 -m pip cache purge'
# Download models and update the configuration file
diff --git a/docker/china/npu.Dockerfile b/docker/china/npu.Dockerfile
index 7eb2ff69..0ad43ce1 100644
--- a/docker/china/npu.Dockerfile
+++ b/docker/china/npu.Dockerfile
@@ -3,7 +3,7 @@
FROM quay.m.daocloud.io/ascend/vllm-ascend:v0.11.0
# Base image containing the LMDeploy inference environment, requiring ARM(AArch64) CPU + Ascend NPU.
# FROM crpi-4crprmm5baj1v8iv.cn-hangzhou.personal.cr.aliyuncs.com/lmdeploy_dlinfer/ascend:mineru-a2
-
+# ARG BACKEND=lmdeploy
# Install libgl for opencv support & Noto fonts for Chinese characters
RUN apt-get update && \
@@ -23,10 +23,13 @@ RUN python3 -m pip install -U pip -i https://mirrors.aliyun.com/pypi/simple && \
numpy==1.26.4 \
opencv-python==4.11.0.86 \
-i https://mirrors.aliyun.com/pypi/simple && \
+ if [ "$BACKEND" = "lmdeploy" ]; then \
+ python3 -m pip install 'qwen-vl-utils>=0.0.14,<1' -i https://mirrors.aliyun.com/pypi/simple; \
+ fi && \
python3 -m pip cache purge
# Download models and update the configuration file
RUN TORCH_DEVICE_BACKEND_AUTOLOAD=0 /bin/bash -c "mineru-models-download -s modelscope -m all"
# Set the entry point to activate the virtual environment and run the command line tool
-ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]
\ No newline at end of file
+ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]
diff --git a/docker/china/ppu.Dockerfile b/docker/china/ppu.Dockerfile
index 5a8ce325..8af39394 100644
--- a/docker/china/ppu.Dockerfile
+++ b/docker/china/ppu.Dockerfile
@@ -3,6 +3,7 @@
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.
# FROM crpi-4crprmm5baj1v8iv.cn-hangzhou.personal.cr.aliyuncs.com/lmdeploy_dlinfer/ppu:mineru-ppu
+# ARG BACKEND=lmdeploy
# Install libgl for opencv support & Noto fonts for Chinese characters
RUN apt-get update && \
@@ -21,10 +22,13 @@ RUN python3 -m pip install -U pip -i https://mirrors.aliyun.com/pypi/simple && \
numpy==1.26.4 \
opencv-python==4.11.0.86 \
-i https://mirrors.aliyun.com/pypi/simple && \
+ if [ "$BACKEND" = "lmdeploy" ]; then \
+ python3 -m pip install 'qwen-vl-utils>=0.0.14,<1' -i https://mirrors.aliyun.com/pypi/simple; \
+ fi && \
python3 -m pip cache purge
# Download models and update the configuration file
RUN /bin/bash -c "mineru-models-download -s modelscope -m all"
# Set the entry point to activate the virtual environment and run the command line tool
-ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]
\ No newline at end of file
+ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]
diff --git a/docs/zh/usage/acceleration_cards/Ascend.md b/docs/zh/usage/acceleration_cards/Ascend.md
index a321186a..7aa643f7 100644
--- a/docs/zh/usage/acceleration_cards/Ascend.md
+++ b/docs/zh/usage/acceleration_cards/Ascend.md
@@ -47,7 +47,7 @@ docker build --network=host -t mineru:npu-vllm-latest -f npu.Dockerfile .
```bash
wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/china/npu.Dockerfile
# 将基础镜像从 vllm 切换为 lmdeploy
-sed -i '3s/^/# /' npu.Dockerfile && sed -i '5s/^# //' npu.Dockerfile
+sed -i '3s/^/# /' npu.Dockerfile && sed -i '5,6s/^# //' npu.Dockerfile
docker build --network=host -t mineru:npu-lmdeploy-latest -f npu.Dockerfile .
```
diff --git a/docs/zh/usage/acceleration_cards/METAX.md b/docs/zh/usage/acceleration_cards/METAX.md
index cc8f5d19..8056d10b 100644
--- a/docs/zh/usage/acceleration_cards/METAX.md
+++ b/docs/zh/usage/acceleration_cards/METAX.md
@@ -31,7 +31,7 @@ docker: 28.1.1
```bash
wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/china/maca.Dockerfile
# 将基础镜像从 vllm 切换为 lmdeploy
-sed -i '3s/^/# /' maca.Dockerfile && sed -i '5s/^# //' maca.Dockerfile
+sed -i '3s/^/# /' maca.Dockerfile && sed -i '5,6s/^# //' maca.Dockerfile
docker build --network=host -t mineru:maca-lmdeploy-latest -f maca.Dockerfile .
```
diff --git a/docs/zh/usage/acceleration_cards/THead.md b/docs/zh/usage/acceleration_cards/THead.md
index e46bb79a..98e9dee0 100644
--- a/docs/zh/usage/acceleration_cards/THead.md
+++ b/docs/zh/usage/acceleration_cards/THead.md
@@ -25,7 +25,7 @@ docker build --network=host -t mineru:ppu-vllm-latest -f ppu.Dockerfile .
```bash
wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/china/ppu.Dockerfile
# 将基础镜像从 vllm 切换为 lmdeploy
-sed -i '3s/^/# /' ppu.Dockerfile && sed -i '5s/^# //' ppu.Dockerfile
+sed -i '3s/^/# /' ppu.Dockerfile && sed -i '5,6s/^# //' ppu.Dockerfile
docker build --network=host -t mineru:ppu-lmdeploy-latest -f ppu.Dockerfile .
```