更新相关的文档和配置
This commit is contained in:
1 parent
79db56a87b
commit
0d383725b5
6 files changed
+2459
-1949
No files matched your search
+16
-13
@@ -21,31 +21,28 @@ dependencies = [
|
||||
# PP-OCRv6 引擎(RapidOCR + ONNX Runtime)
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# CPU 推理(所有平台通用,包括 M4 的 CoreML 实验性支持)
|
||||
rapidocr = [
|
||||
"rapidocr>=3.9.0",
|
||||
"onnxruntime>=1.20.0",
|
||||
]
|
||||
rapidocr = ["rapidocr>=3.9.0", "onnxruntime>=1.20.0"]
|
||||
|
||||
# GPU 推理(NVIDIA CUDA,仅 Linux/Windows)
|
||||
rapidocr-gpu = [
|
||||
"onnxruntime-gpu>=1.20.0",
|
||||
]
|
||||
rapidocr-gpu = ["onnxruntime-gpu>=1.20.0; sys_platform != 'darwin'"]
|
||||
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# PaddleOCR-VL 引擎(HuggingFace Transformers)
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# CPU/MPS(macOS 自动获取 CPU/MPS 版本,Linux/Windows 自动走 CPU 版本)
|
||||
vl = [
|
||||
"torch>=2.0.0",
|
||||
"torchvision>=0.15.0",
|
||||
"transformers>=5.0.0",
|
||||
]
|
||||
vl = ["torch>=2.0.0", "torchvision>=0.15.0", "transformers>=5.0.0"]
|
||||
|
||||
# GPU(通过 [tool.uv.sources] 自动选择 CUDA 版本,无需重复声明)
|
||||
# 见下方 pytorch-cu128 源映射:Linux/Windows 自动使用 CUDA 12.8 版本
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
|
||||
all = ["tianmu[rapidocr,rapidocr-gpu,vl]"]
|
||||
# all - 在所有平台上安装可用组件(macOS 自动跳过 GPU)
|
||||
all = [
|
||||
"tianmu[rapidocr,vl]",
|
||||
# 在非 macOS 平台上额外安装 GPU 依赖
|
||||
"onnxruntime-gpu>=1.20.0; sys_platform != 'darwin'",
|
||||
]
|
||||
|
||||
dev = [
|
||||
"pre-commit>=4.6.0",
|
||||
"pytest>=9.1.1",
|
||||
@@ -56,6 +53,12 @@ lint = ["black>=26.5.1", "mypy>=2.3.0", "ruff>=0.15.21"]
|
||||
test = ["pytest>=9.1.1", "pytest-asyncio>=1.4.0", "pytest-cov>=7.1.0"]
|
||||
dev-all = ["tianmu[dev,lint,test]"]
|
||||
|
||||
# macOS 专用 extra(包含所有 macOS 兼容组件)
|
||||
macos = ["tianmu[rapidocr,vl,dev,lint,test]"]
|
||||
|
||||
# GPU 专用 extra(仅 Linux/Windows)
|
||||
gpu = ["tianmu[rapidocr-gpu,vl]"]
|
||||
|
||||
[project.scripts]
|
||||
tianmu = "src.main:main_cli"
|
||||
|
||||
|
||||
Reference in new issue
Block a user