Improve docling integration with macOS compatibility and CLI flag

- Add --docling CLI flag for easier setup
- Add numpy version constraints
- Exclude docling on macOS (fork-safety)
This commit is contained in:
yangdx
2025-11-13 18:58:09 +08:00
parent 63510478e5
commit c246eff725
4 changed files with 874 additions and 681 deletions

View File

@@ -29,7 +29,7 @@ dependencies = [
"json_repair",
"nano-vectordb",
"networkx",
"numpy",
"numpy>=1.24.0,<2.0.0",
"pandas>=2.0.0,<2.4.0",
"pipmaster",
"pydantic",
@@ -50,7 +50,7 @@ api = [
"json_repair",
"nano-vectordb",
"networkx",
"numpy",
"numpy>=1.24.0,<2.0.0",
"openai>=1.0.0,<3.0.0",
"pandas>=2.0.0,<2.4.0",
"pipmaster",
@@ -90,7 +90,9 @@ api = [
# Advanced document processing engine (optional)
docling = [
"docling>=2.0.0,<3.0.0",
# On macOS, pytorch and frameworks use Objective-C are not fork-safe,
# and not compatible to gunicorn multi-worker mode
"docling>=2.0.0,<3.0.0; sys_platform != 'darwin'",
]
# Offline deployment dependencies (layered design for flexibility)