Skip to content

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

feat: update musa Dockerfile version and modify package installation for compatibility

myhlolibc18bc066542
diff --git a/docker/china/musa.Dockerfile b/docker/china/musa.Dockerfile
index 79b2900b..171a5ed1 100644
--- a/docker/china/musa.Dockerfile
+++ b/docker/china/musa.Dockerfile
@@ -1,5 +1,5 @@
# Base image containing the vLLM inference environment, requiring amd64(x86-64) CPU + MooreThreads GPU.
-FROM registry.mthreads.com/mcconline/vllm-musa-qy2-py310:v0.9.2-rc2
+FROM registry.mthreads.com/mcconline/vllm-musa-qy2-py310:v0.8.4-release
# Install libgl for opencv support & Noto fonts for Chinese characters
@@ -15,15 +15,16 @@ RUN apt-get update && \
# Install mineru latest
RUN python3 -m pip install -U pip -i https://mirrors.aliyun.com/pypi/simple && \
- python3 -m pip install mineru[api,gradio] \
+ python3 -m pip install "mineru[api,gradio]>=2.7.2" \
"matplotlib>=3.10,<4" \
"ultralytics>=8.3.48,<9" \
"doclayout_yolo==0.0.4" \
+ torchvision==0.20.0 \
"ftfy>=6.3.1,<7" \
"shapely>=2.0.7,<3" \
"pyclipper>=1.3.0,<2" \
"omegaconf>=2.3.0,<3" \
- numpy==1.26.1 \
+ numpy==1.26.4 \
opencv-python==4.11.0.86 \
-i https://mirrors.aliyun.com/pypi/simple && \
python3 -m pip cache purge
diff --git a/docs/zh/usage/acceleration_cards/MooreThreads.md b/docs/zh/usage/acceleration_cards/MooreThreads.md
index 64958bfa..bedc736e 100644
--- a/docs/zh/usage/acceleration_cards/MooreThreads.md
+++ b/docs/zh/usage/acceleration_cards/MooreThreads.md
@@ -108,4 +108,4 @@ docker run -u root --name mineru_docker \
🔴: 不支持,无法运行,或精度存在较大差异
>[!TIP]
->MooreThreads 加速卡指定可用加速卡的方式与Nvidia GPU类似,请参考[GPU 枚举](https://docs.mthreads.com/cloud-native/cloud-native-doc-online/install_guide/#gpu-%E6%9E%9A%E4%B8%BE)
\ No newline at end of file
+>MooreThreads加速卡指定可用加速卡的方式与NVIDIA GPU类似,请参考[GPU 枚举](https://docs.mthreads.com/cloud-native/cloud-native-doc-online/install_guide/#gpu-%E6%9E%9A%E4%B8%BE)
\ No newline at end of file
diff --git a/mineru/backend/vlm/vlm_analyze.py b/mineru/backend/vlm/vlm_analyze.py
index d6e882d5..f354b6c8 100644
--- a/mineru/backend/vlm/vlm_analyze.py
+++ b/mineru/backend/vlm/vlm_analyze.py
@@ -100,6 +100,9 @@ class ModelSingleton:
import vllm
except ImportError:
raise ImportError("Please install vllm to use the vllm-engine backend.")
+
+ """
+ # musa vllm v1 引擎特殊配置
device = get_device()
if device.startswith("musa"):
import torch
@@ -111,6 +114,7 @@ class ModelSingleton:
block_size = 32
kwargs["compilation_config"] = compilation_config
kwargs["block_size"] = block_size
+ """
if "compilation_config" in kwargs:
if isinstance(kwargs["compilation_config"], str):
@@ -136,6 +140,9 @@ class ModelSingleton:
from vllm.config import CompilationConfig
except ImportError:
raise ImportError("Please install vllm to use the vllm-async-engine backend.")
+
+ """
+ # musa vllm v1 引擎特殊配置
device = get_device()
if device.startswith("musa"):
import torch
@@ -147,6 +154,7 @@ class ModelSingleton:
block_size = 32
kwargs["compilation_config"] = compilation_config
kwargs["block_size"] = block_size
+ """
if "compilation_config" in kwargs:
if isinstance(kwargs["compilation_config"], dict):
diff --git a/mineru/model/vlm/vllm_server.py b/mineru/model/vlm/vllm_server.py
index 68952525..ecedd5f2 100644
--- a/mineru/model/vlm/vllm_server.py
+++ b/mineru/model/vlm/vllm_server.py
@@ -56,6 +56,8 @@ def main():
model_path = auto_download_and_get_model_root_path("/", "vlm")
if (not has_logits_processors_arg) and custom_logits_processors:
args.extend(["--logits-processors", "mineru_vl_utils:MinerULogitsProcessor"])
+ """
+ # musa vllm v1 引擎特殊配置
device = get_device()
if device.startswith("musa"):
import torch
@@ -64,6 +66,7 @@ def main():
args.extend(["--block-size", "32"])
if not has_compilation_config:
args.extend(["--compilation-config", '{"cudagraph_capture_sizes": [1,2,3,4,5,6,7,8,10,12,14,16,18,20,24,28,30], "simple_cuda_graph": true}'])
+ """
# 重构参数,将模型路径作为位置参数
sys.argv = [sys.argv[0]] + ["serve", model_path] + args