Skip to content

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

feat: add Ascend NPU support for router multi-card deployment

scyiwei1986fa8848a38284
diff --git a/mineru/cli/router.py b/mineru/cli/router.py
index 8d924f3d..6cad6d99 100644
--- a/mineru/cli/router.py
+++ b/mineru/cli/router.py
@@ -349,7 +349,10 @@ class ManagedLocalServer:
env["MINERU_API_OUTPUT_ROOT"] = str(output_root)
env["MINERU_API_DISABLE_ACCESS_LOG"] = "1"
if self.gpu is not None:
- env["CUDA_VISIBLE_DEVICES"] = str(self.gpu)
+ if os.getenv("MINERU_DEVICE_MODE") == "npu":
+ env["ASCEND_RT_VISIBLE_DEVICES"] = str(self.gpu)
+ else:
+ env["CUDA_VISIBLE_DEVICES"] = str(self.gpu)
command = [
sys.executable,