Skip to content

Commit 4e5f03b

Browse files
authored
Merge pull request #4063 from opendatalab/release-2.6.5
2 parents fa1149c + dfd99ba commit 4e5f03b

40 files changed

+1515
-387
lines changed

README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
</div>
4545

4646
# Changelog
47+
- 2025/11/26 2.6.5 Release
48+
- Added support for a new backend vlm-lmdeploy-engine. Its usage is similar to vlm-vllm-(async)engine, but it uses lmdeploy as the inference engine and additionally supports native inference acceleration on Windows platforms compared to vllm.
49+
4750
- 2025/11/04 2.6.4 Release
4851
- Added timeout configuration for PDF image rendering, default is 300 seconds, can be configured via environment variable `MINERU_PDF_RENDER_TIMEOUT` to prevent long blocking of the rendering process caused by some abnormal PDF files.
4952
- Added CPU thread count configuration options for ONNX models, default is the system CPU core count, can be configured via environment variables `MINERU_INTRA_OP_NUM_THREADS` and `MINERU_INTER_OP_NUM_THREADS` to reduce CPU resource contention conflicts in high concurrency scenarios.
@@ -632,12 +635,13 @@ A WebUI developed based on Gradio, with a simple interface and only core parsing
632635
<tr>
633636
<th rowspan="2">Parsing Backend</th>
634637
<th rowspan="2">pipeline <br> (Accuracy<sup>1</sup> 82+)</th>
635-
<th colspan="4">vlm (Accuracy<sup>1</sup> 90+)</th>
638+
<th colspan="5">vlm (Accuracy<sup>1</sup> 90+)</th>
636639
</tr>
637640
<tr>
638641
<th>transformers</th>
639642
<th>mlx-engine</th>
640643
<th>vllm-engine / <br>vllm-async-engine</th>
644+
<th>lmdeploy-engine</th>
641645
<th>http-client</th>
642646
</tr>
643647
</thead>
@@ -648,40 +652,42 @@ A WebUI developed based on Gradio, with a simple interface and only core parsing
648652
<td>Good compatibility, <br>but slower</td>
649653
<td>Faster than transformers</td>
650654
<td>Fast, compatible with the vLLM ecosystem</td>
651-
<td>Suitable for OpenAI-compatible servers<sup>5</sup></td>
655+
<td>Fast, compatible with the LMDeploy ecosystem</td>
656+
<td>Suitable for OpenAI-compatible servers<sup>6</sup></td>
652657
</tr>
653658
<tr>
654659
<th>Operating System</th>
655660
<td colspan="2" style="text-align:center;">Linux<sup>2</sup> / Windows / macOS</td>
656661
<td style="text-align:center;">macOS<sup>3</sup></td>
657662
<td style="text-align:center;">Linux<sup>2</sup> / Windows<sup>4</sup> </td>
663+
<td style="text-align:center;">Linux<sup>2</sup> / Windows<sup>5</sup> </td>
658664
<td>Any</td>
659665
</tr>
660666
<tr>
661667
<th>CPU inference support</th>
662668
<td colspan="2" style="text-align:center;">✅</td>
663-
<td colspan="2" style="text-align:center;">❌</td>
669+
<td colspan="3" style="text-align:center;">❌</td>
664670
<td>Not required</td>
665671
</tr>
666672
<tr>
667673
<th>GPU Requirements</th><td colspan="2" style="text-align:center;">Volta or later architectures, 6 GB VRAM or more, or Apple Silicon</td>
668674
<td>Apple Silicon</td>
669-
<td>Volta or later architectures, 8 GB VRAM or more</td>
675+
<td colspan="2" style="text-align:center;">Volta or later architectures, 8 GB VRAM or more</td>
670676
<td>Not required</td>
671677
</tr>
672678
<tr>
673679
<th>Memory Requirements</th>
674-
<td colspan="4" style="text-align:center;">Minimum 16 GB, 32 GB recommended</td>
680+
<td colspan="5" style="text-align:center;">Minimum 16 GB, 32 GB recommended</td>
675681
<td>8 GB</td>
676682
</tr>
677683
<tr>
678684
<th>Disk Space Requirements</th>
679-
<td colspan="4" style="text-align:center;">20 GB or more, SSD recommended</td>
685+
<td colspan="5" style="text-align:center;">20 GB or more, SSD recommended</td>
680686
<td>2 GB</td>
681687
</tr>
682688
<tr>
683689
<th>Python Version</th>
684-
<td colspan="5" style="text-align:center;">3.10-3.13</td>
690+
<td colspan="6" style="text-align:center;">3.10-3.13<sup>7</sup></td>
685691
</tr>
686692
</tbody>
687693
</table>
@@ -690,7 +696,9 @@ A WebUI developed based on Gradio, with a simple interface and only core parsing
690696
<sup>2</sup> Linux supports only distributions released in 2019 or later.
691697
<sup>3</sup> MLX requires macOS 13.5 or later, recommended for use with version 14.0 or higher.
692698
<sup>4</sup> Windows vLLM support via WSL2(Windows Subsystem for Linux).
693-
<sup>5</sup> Servers compatible with the OpenAI API, such as local or remote model services deployed via inference frameworks like `vLLM`, `SGLang`, or `LMDeploy`.
699+
<sup>5</sup> Windows LMDeploy can only use the `turbomind` backend, which is slightly slower than the `pytorch` backend. If performance is critical, it is recommended to run it via WSL2.
700+
<sup>6</sup> Servers compatible with the OpenAI API, such as local or remote model services deployed via inference frameworks like `vLLM`, `SGLang`, or `LMDeploy`.
701+
<sup>7</sup> Windows + LMDeploy only supports Python versions 3.10–3.12, as the critical dependency `ray` does not yet support Python 3.13 on Windows.
694702

695703

696704
### Install MinerU
@@ -710,8 +718,8 @@ uv pip install -e .[core]
710718
```
711719

712720
> [!TIP]
713-
> `mineru[core]` includes all core features except `vLLM` acceleration, compatible with Windows / Linux / macOS systems, suitable for most users.
714-
> If you need to use `vLLM` acceleration for VLM model inference or install a lightweight client on edge devices, please refer to the documentation [Extension Modules Installation Guide](https://opendatalab.github.io/MinerU/quick_start/extension_modules/).
721+
> `mineru[core]` includes all core features except `vLLM`/`LMDeploy` acceleration, compatible with Windows / Linux / macOS systems, suitable for most users.
722+
> If you need to use `vLLM`/`LMDeploy` acceleration for VLM model inference or install a lightweight client on edge devices, please refer to the documentation [Extension Modules Installation Guide](https://opendatalab.github.io/MinerU/quick_start/extension_modules/).
715723
716724
---
717725

README_zh-CN.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@
4444
</div>
4545

4646
# 更新记录
47+
48+
- 2025/11/26 2.6.5 发布
49+
- 增加新后端`vlm-lmdeploy-engine`支持,使用方式与`vlm-vllm-(async)engine`类似,但使用`lmdeploy`作为推理引擎,与`vllm`相比额外支持Windows平台原生推理加速。
50+
- 新增国产算力平台`昇腾/npu``平头哥/ppu``沐曦/maca`的适配支持,用户可在对应平台上使用`pipeline``vlm`模型,并使用`vllm`/`lmdeploy`引擎加速vlm模型推理,具体使用方式请参考[其他加速卡适配](https://opendatalab.github.io/MinerU/zh/usage/)
51+
- 国产平台适配不易,我们已尽量确保适配的完整性和稳定性,但仍可能存在一些稳定性/兼容问题与精度对齐问题,请大家根据适配文档页面内红绿灯情况自行选择合适的环境与场景进行使用。
52+
- 如在使用国产化平台适配方案的过程中遇到任何文档未提及的问题,为便于其他用户查找解决方案,请在discussions的[指定帖子](https://github.com/opendatalab/MinerU/discussions/4053)中进行反馈。
53+
4754
- 2025/11/04 2.6.4 发布
4855
- 为pdf渲染图片增加超时配置,默认为300秒,可通过环境变量`MINERU_PDF_RENDER_TIMEOUT`进行配置,防止部分异常pdf文件导致渲染过程长时间阻塞。
4956
- 为onnx模型增加cpu线程数配置选项,默认为系统cpu核心数,可通过环境变量`MINERU_INTRA_OP_NUM_THREADS``MINERU_INTER_OP_NUM_THREADS`进行配置,以减少高并发场景下的对cpu资源的抢占冲突。
@@ -619,12 +626,13 @@ https://github.com/user-attachments/assets/4bea02c9-6d54-4cd6-97ed-dff14340982c
619626
<tr>
620627
<th rowspan="2">解析后端</th>
621628
<th rowspan="2">pipeline <br> (精度<sup>1</sup> 82+)</th>
622-
<th colspan="4">vlm (精度<sup>1</sup> 90+)</th>
629+
<th colspan="5">vlm (精度<sup>1</sup> 90+)</th>
623630
</tr>
624631
<tr>
625632
<th>transformers</th>
626633
<th>mlx-engine</th>
627634
<th>vllm-engine / <br>vllm-async-engine</th>
635+
<th>lmdeploy-engine</th>
628636
<th>http-client</th>
629637
</tr>
630638
</thead>
@@ -635,40 +643,42 @@ https://github.com/user-attachments/assets/4bea02c9-6d54-4cd6-97ed-dff14340982c
635643
<td>兼容性好, 速度较慢</td>
636644
<td>比transformers快</td>
637645
<td>速度快, 兼容vllm生态</td>
638-
<td>适用于OpenAI兼容服务器<sup>5</sup></td>
646+
<td>速度快, 兼容lmdeploy生态</td>
647+
<td>适用于OpenAI兼容服务器<sup>6</sup></td>
639648
</tr>
640649
<tr>
641650
<th>操作系统</th>
642651
<td colspan="2" style="text-align:center;">Linux<sup>2</sup> / Windows / macOS</td>
643652
<td style="text-align:center;">macOS<sup>3</sup></td>
644653
<td style="text-align:center;">Linux<sup>2</sup> / Windows<sup>4</sup> </td>
654+
<td style="text-align:center;">Linux<sup>2</sup> / Windows<sup>5</sup> </td>
645655
<td>不限</td>
646656
</tr>
647657
<tr>
648658
<th>CPU推理支持</th>
649659
<td colspan="2" style="text-align:center;">✅</td>
650-
<td colspan="2" style="text-align:center;">❌</td>
660+
<td colspan="3" style="text-align:center;">❌</td>
651661
<td >不需要</td>
652662
</tr>
653663
<tr>
654664
<th>GPU要求</th><td colspan="2" style="text-align:center;">Volta及以后架构, 6G显存以上或Apple Silicon</td>
655665
<td>Apple Silicon</td>
656-
<td>Volta及以后架构, 8G显存以上</td>
666+
<td colspan="2" style="text-align:center;">Volta及以后架构, 8G显存以上</td>
657667
<td>不需要</td>
658668
</tr>
659669
<tr>
660670
<th>内存要求</th>
661-
<td colspan="4" style="text-align:center;">最低16GB以上, 推荐32GB以上</td>
671+
<td colspan="5" style="text-align:center;">最低16GB以上, 推荐32GB以上</td>
662672
<td>8GB</td>
663673
</tr>
664674
<tr>
665675
<th>磁盘空间要求</th>
666-
<td colspan="4" style="text-align:center;">20GB以上, 推荐使用SSD</td>
676+
<td colspan="5" style="text-align:center;">20GB以上, 推荐使用SSD</td>
667677
<td>2GB</td>
668678
</tr>
669679
<tr>
670680
<th>python版本</th>
671-
<td colspan="5" style="text-align:center;">3.10-3.13</td>
681+
<td colspan="6" style="text-align:center;">3.10-3.13<sup>7</sup></td>
672682
</tr>
673683
</tbody>
674684
</table>
@@ -677,7 +687,9 @@ https://github.com/user-attachments/assets/4bea02c9-6d54-4cd6-97ed-dff14340982c
677687
<sup>2</sup> Linux仅支持2019年及以后发行版
678688
<sup>3</sup> MLX需macOS 13.5及以上版本支持,推荐14.0以上版本使用
679689
<sup>4</sup> Windows vLLM通过WSL2(适用于 Linux 的 Windows 子系统)实现支持
680-
<sup>5</sup> 兼容OpenAI API的服务器,如通过`vLLM`/`SGLang`/`LMDeploy`等推理框架部署的本地模型服务器或远程模型服务
690+
<sup>5</sup> Windows LMDeploy只能使用`turbomind`后端,速度比`pytorch`后端稍慢,如对速度有要求建议通过WSL2运行
691+
<sup>6</sup> 兼容OpenAI API的服务器,如通过`vLLM`/`SGLang`/`LMDeploy`等推理框架部署的本地模型服务器或远程模型服务
692+
<sup>7</sup> Windows + LMDeploy 由于关键依赖`ray`未能在windows平台支持Python 3.13,故仅支持至3.10~3.12版本
681693

682694
> [!TIP]
683695
> 除以上主流环境与平台外,我们也收录了一些社区用户反馈的其他平台支持情况,详情请参考[其他加速卡适配](https://opendatalab.github.io/MinerU/zh/usage/)
@@ -700,8 +712,8 @@ uv pip install -e .[core] -i https://mirrors.aliyun.com/pypi/simple
700712
```
701713

702714
> [!TIP]
703-
> `mineru[core]`包含除`vLLM`加速外的所有核心功能,兼容Windows / Linux / macOS系统,适合绝大多数用户。
704-
> 如果您有使用`vLLM`加速VLM模型推理,或是在边缘设备安装轻量版client端等需求,可以参考文档[扩展模块安装指南](https://opendatalab.github.io/MinerU/zh/quick_start/extension_modules/)
715+
> `mineru[core]`包含除`vLLM`/`LMDeploy`加速外的所有核心功能,兼容Windows / Linux / macOS系统,适合绝大多数用户。
716+
> 如果您需要使用`vLLM`/`LMDeploy`加速VLM模型推理,或是有在边缘设备安装轻量版client端等需求,可以参考文档[扩展模块安装指南](https://opendatalab.github.io/MinerU/zh/quick_start/extension_modules/)
705717
706718
---
707719

demo/demo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,5 +236,6 @@ def parse_doc(
236236
"""To enable VLM mode, change the backend to 'vlm-xxx'"""
237237
# parse_doc(doc_path_list, output_dir, backend="vlm-transformers") # more general.
238238
# parse_doc(doc_path_list, output_dir, backend="vlm-mlx-engine") # faster than transformers in macOS 13.5+.
239-
# parse_doc(doc_path_list, output_dir, backend="vlm-vllm-engine") # faster(engine).
239+
# parse_doc(doc_path_list, output_dir, backend="vlm-vllm-engine") # faster(vllm-engine).
240+
# parse_doc(doc_path_list, output_dir, backend="vlm-lmdeploy-engine") # faster(lmdeploy-engine).
240241
# parse_doc(doc_path_list, output_dir, backend="vlm-http-client", server_url="http://127.0.0.1:30000") # faster(client).

docker/china/Dockerfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,9 @@
22
# Compute Capability version query (https://developer.nvidia.com/cuda-gpus)
33
FROM docker.m.daocloud.io/vllm/vllm-openai:v0.10.1.1
44

5-
# Use the official vllm image
6-
# FROM vllm/vllm-openai:v0.10.1.1
7-
85
# Use DaoCloud mirrored vllm image for China region for gpu with Turing architecture and below (Compute Capability<8.0)
96
# FROM docker.m.daocloud.io/vllm/vllm-openai:v0.10.2
107

11-
# Use the official vllm image
12-
# FROM vllm/vllm-openai:v0.10.2
13-
148
# Install libgl for opencv support & Noto fonts for Chinese characters
159
RUN apt-get update && \
1610
apt-get install -y \

docker/china/maca.Dockerfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# 基础镜像配置 vLLM 或 LMDeploy 推理环境,请根据实际需要选择其中一个,要求 amd64(x86-64) CPU + metax GPU。
2+
# Base image containing the vLLM inference environment, requiring amd64(x86-64) CPU + metax GPU.
3+
FROM cr.metax-tech.com/public-ai-release/maca/vllm:maca.ai3.1.0.7-torch2.6-py310-ubuntu22.04-amd64
4+
# Base image containing the LMDeploy inference environment, requiring amd64(x86-64) CPU + metax GPU.
5+
# 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
6+
7+
# Install libgl for opencv support & Noto fonts for Chinese characters
8+
RUN apt-get update && \
9+
apt-get install -y \
10+
fonts-noto-core \
11+
fonts-noto-cjk \
12+
fontconfig \
13+
libgl1 && \
14+
fc-cache -fv && \
15+
apt-get clean && \
16+
rm -rf /var/lib/apt/lists/*
17+
18+
# mod torchvision to be compatible with torch 2.6
19+
RUN sed -i '3s/^Version: 0.15.1+metax3\.1\.0\.4$/Version: 0.21.0+metax3.1.0.4/' /opt/conda/lib/python3.10/site-packages/torchvision-0.15.1+metax3.1.0.4.dist-info/METADATA && \
20+
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
21+
22+
# Install mineru latest
23+
RUN /opt/conda/bin/python3 -m pip install -U pip -i https://mirrors.aliyun.com/pypi/simple && \
24+
/opt/conda/bin/python3 -m pip install 'mineru[core]>=2.6.5' \
25+
numpy==1.26.4 \
26+
opencv-python==4.11.0.86 \
27+
-i https://mirrors.aliyun.com/pypi/simple && \
28+
/opt/conda/bin/python3 -m pip cache purge
29+
30+
# Download models and update the configuration file
31+
RUN /bin/bash -c "/opt/conda/bin/mineru-models-download -s modelscope -m all"
32+
33+
# Set the entry point to activate the virtual environment and run the command line tool
34+
ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]

docker/china/npu.Dockerfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# 基础镜像配置 vLLM 或 LMDeploy ,请根据实际需要选择其中一个,要求 ARM(AArch64) CPU + Ascend NPU。
2+
# Base image containing the vLLM inference environment, requiring ARM(AArch64) CPU + Ascend NPU.
3+
FROM quay.io/ascend/vllm-ascend:v0.11.0rc1
4+
# Base image containing the LMDeploy inference environment, requiring ARM(AArch64) CPU + Ascend NPU.
5+
# FROM crpi-4crprmm5baj1v8iv.cn-hangzhou.personal.cr.aliyuncs.com/lmdeploy_dlinfer/ascend:mineru-a2
6+
7+
8+
# Install libgl for opencv support & Noto fonts for Chinese characters
9+
RUN apt-get update && \
10+
apt-get install -y \
11+
fonts-noto-core \
12+
fonts-noto-cjk \
13+
fontconfig \
14+
libgl1 \
15+
libglib2.0-0 && \
16+
fc-cache -fv && \
17+
apt-get clean && \
18+
rm -rf /var/lib/apt/lists/*
19+
20+
# Install mineru latest
21+
RUN python3 -m pip install -U pip -i https://mirrors.aliyun.com/pypi/simple && \
22+
python3 -m pip install -U 'mineru[core]>=2.6.5' -i https://mirrors.aliyun.com/pypi/simple && \
23+
python3 -m pip cache purge
24+
25+
# Download models and update the configuration file
26+
RUN TORCH_DEVICE_BACKEND_AUTOLOAD=0 /bin/bash -c "mineru-models-download -s modelscope -m all"
27+
28+
# Set the entry point to activate the virtual environment and run the command line tool
29+
ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]

docker/china/ppu.Dockerfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
7+
# Install libgl for opencv support & Noto fonts for Chinese characters
8+
RUN apt-get update && \
9+
apt-get install -y \
10+
fonts-noto-core \
11+
fonts-noto-cjk \
12+
fontconfig \
13+
libgl1 && \
14+
fc-cache -fv && \
15+
apt-get clean && \
16+
rm -rf /var/lib/apt/lists/*
17+
18+
# Install mineru latest
19+
RUN python3 -m pip install -U pip -i https://mirrors.aliyun.com/pypi/simple && \
20+
python3 -m pip install 'mineru[core]>=2.6.5' \
21+
numpy==1.26.4 \
22+
opencv-python==4.11.0.86 \
23+
huggingface_hub==0.36.0 \
24+
dill==0.3.6 \
25+
setuptools==74.1.1 \
26+
tokenizers==0.21.1 \
27+
-i https://mirrors.aliyun.com/pypi/simple && \
28+
python3 -m pip cache purge
29+
30+
# Download models and update the configuration file
31+
RUN /bin/bash -c "mineru-models-download -s modelscope -m all"
32+
33+
# Set the entry point to activate the virtual environment and run the command line tool
34+
ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]

0 commit comments

Comments
 (0)