Skip to content

Commit e31c0ec

Browse files
authored
Merge pull request #4508 from opendatalab/release-2.7.6
Release 2.7.6
2 parents 5fa6620 + 3e51cb4 commit e31c0ec

File tree

16 files changed

+443
-140
lines changed

16 files changed

+443
-140
lines changed

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,22 @@
4545

4646
# Changelog
4747

48-
- 2026/01/30 2.7.4 Release
49-
- Added support for domestic computing platforms IluvatarCorex and Cambricon. Currently, the officially supported domestic computing platforms include:
50-
- [Ascend](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/Ascend/)
51-
- [T-Head](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/THead/)
52-
- [METAX](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/METAX/)
48+
- 2026/02/06 2.7.6 Release
49+
- Added support for the domestic computing platforms Kunlunxin and Tecorigin; currently, the domestic computing platforms that have been adapted and supported by the official team and vendors include:
50+
- [Ascend](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/Ascend)
51+
- [T-Head](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/THead)
52+
- [METAX](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/METAX)
5353
- [Hygon](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/Hygon/)
5454
- [Enflame](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/Enflame/)
5555
- [MooreThreads](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/MooreThreads/)
5656
- [IluvatarCorex](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/IluvatarCorex/)
5757
- [Cambricon](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/Cambricon/)
58-
- MinerU continues to ensure compatibility with domestic hardware platforms, supporting mainstream chip architectures. With secure and reliable technology, we empower researchers, government, and enterprises to reach new heights in document digitization!
58+
- [Kunlunxin](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/Kunlunxin/)
59+
- [Tecorigin](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/Tecorigin/)
60+
- MinerU continues to support domestic hardware platforms and mainstream chip architectures. With secure and reliable technology, it helps research, government, and enterprise users reach new heights in document digitization!
61+
62+
- 2026/01/30 2.7.4 Release
63+
- Added support for domestic computing platforms IluvatarCorex and Cambricon.
5964

6065
- 2026/01/23 2.7.2 Release
6166
- Added support for domestic computing platforms Hygon, Enflame, and Moore Threads.

README_zh-CN.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545

4646
# 更新记录
4747

48-
- 2026/01/30 2.7.4 发布
49-
- 新增国产算力平台天数智芯、寒武纪的适配支持,目前已由官方适配并支持的国产算力平台包括:
48+
- 2026/02/06 2.7.6 发布
49+
- 新增国产算力平台昆仑芯、太初元碁的适配支持,目前已由官方和厂商适配并支持的国产算力平台包括:
5050
- [昇腾 Ascend](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/Ascend)
5151
- [平头哥 T-Head](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/THead)
5252
- [沐曦 METAX](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/METAX)
@@ -55,8 +55,13 @@
5555
- [摩尔线程 MooreThreads](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/MooreThreads/)
5656
- [天数智芯 IluvatarCorex](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/IluvatarCorex/)
5757
- [寒武纪 Cambricon](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/Cambricon/)
58+
- [昆仑芯 Kunlunxin](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/Kunlunxin/)
59+
- [太初元碁 Tecorigin](https://opendatalab.github.io/MinerU/zh/usage/acceleration_cards/Tecorigin/)
5860
- MinerU 持续兼容国产硬件平台,支持主流芯片架构。以安全可靠的技术,助力科研、政企用户迈向文档数字化新高度!
5961

62+
- 2026/01/30 2.7.4 发布
63+
- 新增国产算力平台天数智芯、寒武纪的适配支持。
64+
6065
- 2026/01/23 2.7.2 发布
6166
- 新增国产算力平台海光、燧原、摩尔线程的适配支持
6267
- 跨页表合并优化,提升合并成功率与合并效果

docker/china/kxpu.Dockerfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Base image containing the vLLM inference environment, requiring amd64(x86-64) CPU + Kunlun XPU.
2+
FROM docker.1ms.run/wjie520/vllm_kunlun:v0.10.1.1rc1
3+
4+
5+
# Install Noto fonts for Chinese characters
6+
RUN apt-get update && \
7+
apt-get install -y \
8+
fonts-noto-core \
9+
fonts-noto-cjk \
10+
fontconfig && \
11+
fc-cache -fv && \
12+
apt-get clean && \
13+
rm -rf /var/lib/apt/lists/*
14+
15+
# Install mineru latest
16+
RUN python3 -m pip install -U pip -i https://mirrors.aliyun.com/pypi/simple && \
17+
python3 -m pip install "mineru[api,gradio]>=2.7.6" \
18+
"matplotlib>=3.10,<4" \
19+
"ultralytics>=8.3.48,<9" \
20+
"doclayout_yolo==0.0.4" \
21+
"ftfy>=6.3.1,<7" \
22+
"shapely>=2.0.7,<3" \
23+
"pyclipper>=1.3.0,<2" \
24+
"omegaconf>=2.3.0,<3" \
25+
-i https://mirrors.aliyun.com/pypi/simple && \
26+
sed -i '1,200{s/self\.act = act_layer()/self.act = nn.GELU()/;t;b};' /root/miniconda/envs/vllm_kunlun_0.10.1.1/lib/python3.10/site-packages/vllm_kunlun/models/qwen2_vl.py && \
27+
python3 -m pip cache purge
28+
29+
# Download models and update the configuration file
30+
RUN /bin/bash -c "mineru-models-download -s modelscope -m all"
31+
32+
# Set the entry point to activate the virtual environment and run the command line tool
33+
ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]

docs/zh/usage/acceleration_cards/IluvatarCorex.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ docker run --name mineru_docker \
3636
--security-opt apparmor=unconfined \
3737
-e VLLM_ENFORCE_CUDA_GRAPH=1 \
3838
-e MINERU_MODEL_SOURCE=local \
39-
-e MINERU_LMDEPLOY_DEVICE=corex \
39+
-e MINERU_VLLM_DEVICE=corex \
4040
-it mineru:corex-vllm-latest \
4141
/bin/bash
4242
```
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
## 1. 测试平台
2+
以下为本指南测试使用的平台信息,供参考:
3+
```
4+
os: Ubuntu 22.04.5 LTS
5+
cpu: Intel x86-64
6+
xpu: P800
7+
driver: 515.58
8+
docker: 20.10.5
9+
```
10+
11+
## 2. 环境准备
12+
13+
### 2.1 使用 Dockerfile 构建镜像 (vllm)
14+
15+
```bash
16+
wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/china/kxpu.Dockerfile
17+
docker build --network=host -t mineru:kxpu-vllm-latest -f kxpu.Dockerfile .
18+
```
19+
20+
## 3. 启动 Docker 容器
21+
22+
```bash
23+
docker run -u root --name mineru_docker \
24+
--device=/dev/xpu0:/dev/xpu0 \
25+
--device=/dev/xpu1:/dev/xpu1 \
26+
--device=/dev/xpu2:/dev/xpu2 \
27+
--device=/dev/xpu3:/dev/xpu3 \
28+
--device=/dev/xpu4:/dev/xpu4 \
29+
--device=/dev/xpu5:/dev/xpu5 \
30+
--device=/dev/xpu6:/dev/xpu6 \
31+
--device=/dev/xpu7:/dev/xpu7 \
32+
--device=/dev/xpuctrl:/dev/xpuctrl \
33+
--net=host \
34+
--cap-add=SYS_PTRACE --security-opt seccomp=unconfined \
35+
--tmpfs /dev/shm:rw,nosuid,nodev,exec,size=32g \
36+
--cap-add=SYS_PTRACE \
37+
-v /home/users/vllm-kunlun:/home/vllm-kunlun \
38+
-v /usr/local/bin/xpu-smi:/usr/local/bin/xpu-smi \
39+
-w /workspace \
40+
-e MINERU_MODEL_SOURCE=local \
41+
-e MINERU_FORMULA_CH_SUPPORT=true \
42+
-e MINERU_VLLM_DEVICE=kxpu \
43+
-it mineru:kxpu-vllm-latest \
44+
/bin/bash
45+
```
46+
47+
执行该命令后,您将进入到Docker容器的交互式终端,您可以直接在容器内运行MinerU相关命令来使用MinerU的功能。
48+
您也可以直接通过替换`/bin/bash`为服务启动命令来启动MinerU服务,详细说明请参考[通过命令启动服务](https://opendatalab.github.io/MinerU/zh/usage/quick_usage/#apiwebuihttp-clientserver)
49+
50+
51+
## 4. 注意事项
52+
53+
不同环境下,MinerU对Kunlunxin加速卡的支持情况如下表所示:
54+
55+
<table border="1">
56+
<thead>
57+
<tr>
58+
<th rowspan="2" colspan="2">使用场景</th>
59+
<th colspan="2">容器环境</th>
60+
</tr>
61+
<tr>
62+
<th>vllm</th>
63+
</tr>
64+
</thead>
65+
<tbody>
66+
<tr>
67+
<td rowspan="3">命令行工具(mineru)</td>
68+
<td>pipeline</td>
69+
<td>🟢</td>
70+
</tr>
71+
<tr>
72+
<td>&lt;vlm/hybrid&gt;-auto-engine</td>
73+
<td>🟢</td>
74+
</tr>
75+
<tr>
76+
<td>&lt;vlm/hybrid&gt;-http-client</td>
77+
<td>🟢</td>
78+
</tr>
79+
<tr>
80+
<td rowspan="3">fastapi服务(mineru-api)</td>
81+
<td>pipeline</td>
82+
<td>🟢</td>
83+
</tr>
84+
<tr>
85+
<td>&lt;vlm/hybrid&gt;-auto-engine</td>
86+
<td>🟢</td>
87+
</tr>
88+
<tr>
89+
<td>&lt;vlm/hybrid&gt;-http-client</td>
90+
<td>🟢</td>
91+
</tr>
92+
<tr>
93+
<td rowspan="3">gradio界面(mineru-gradio)</td>
94+
<td>pipeline</td>
95+
<td>🟢</td>
96+
</tr>
97+
<tr>
98+
<td>&lt;vlm/hybrid&gt;-auto-engine</td>
99+
<td>🟢</td>
100+
</tr>
101+
<tr>
102+
<td>&lt;vlm/hybrid&gt;-http-client</td>
103+
<td>🟢</td>
104+
</tr>
105+
<tr>
106+
<td colspan="2">openai-server服务(mineru-openai-server)</td>
107+
<td>🟢</td>
108+
</tr>
109+
<tr>
110+
<td colspan="2">数据并行 (--data-parallel-size)</td>
111+
<td>🔴</td>
112+
</tr>
113+
</tbody>
114+
</table>
115+
116+
注:
117+
🟢: 支持,运行较稳定,精度与Nvidia GPU基本一致
118+
🟡: 支持但较不稳定,在某些场景下可能出现异常,或精度存在一定差异
119+
🔴: 不支持,无法运行,或精度存在较大差异
120+
121+
>[!TIP]
122+
> - Kunlunxin加速卡指定可用加速卡的方式与NVIDIA GPU类似,请参考[使用指定GPU设备](https://opendatalab.github.io/MinerU/zh/usage/advanced_cli_parameters/#cuda_visible_devices)章节说明,
123+
>将环境变量`CUDA_VISIBLE_DEVICES`替换为`XPU_VISIBLE_DEVICES`即可。
124+
> - 在Kunlunxin平台可以通过`xpu-smi`命令查看加速卡的使用情况,并根据需要指定空闲的加速卡ID以避免资源冲突。

docs/zh/usage/acceleration_cards/MooreThreads.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ docker run -u root --name mineru_docker \
2727
--shm-size=80g \
2828
--privileged \
2929
-e MTHREADS_VISIBLE_DEVICES=all \
30+
-e MINERU_VLLM_DEVICE=musa \
3031
-e MINERU_MODEL_SOURCE=local \
3132
-it mineru:musa-vllm-latest \
3233
/bin/bash

docs/zh/usage/acceleration_cards/THead.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ docker run --privileged=true \
127127
</tr>
128128
<tr>
129129
<td colspan="2">数据并行 (--data-parallel-size/--dp)</td>
130-
<td>🟡</td>
130+
<td>🔴</td>
131131
<td>🔴</td>
132132
</tr>
133133
</tbody>

0 commit comments

Comments
 (0)