Improve offline installation with constraints and version bounds

• Add constraints-offline.txt for exact versions
• Set upper bounds in pyproject.toml
• Combine pip installs in Dockerfile
• Update requirements with version bounds
• Prevent dependency conflicts
This commit is contained in:
yangdx
2025-10-15 23:44:46 +08:00
parent 1fd02b18c4
commit 433ec813ba
7 changed files with 253 additions and 74 deletions

View File

@@ -29,7 +29,7 @@ dependencies = [
"nano-vectordb",
"networkx",
"numpy",
"pandas>=2.0.0",
"pandas>=2.0.0,<2.3.0",
"pipmaster",
"pydantic",
"pypinyin",
@@ -51,8 +51,8 @@ api = [
"nano-vectordb",
"networkx",
"numpy",
"openai",
"pandas>=2.0.0",
"openai>=1.0.0,<2.0.0",
"pandas>=2.0.0,<2.3.0",
"pipmaster",
"pydantic",
"pypinyin",
@@ -72,7 +72,7 @@ api = [
"jiter",
"passlib[bcrypt]",
"psutil",
"PyJWT",
"PyJWT>=2.8.0,<3.0.0",
"python-jose[cryptography]",
"python-multipart",
"pytz",
@@ -82,34 +82,34 @@ api = [
# Offline deployment dependencies (layered design for flexibility)
offline-docs = [
# Document processing dependencies
"docling>=1.0.0",
"docling>=1.0.0,<3.0.0",
"pypdf2>=3.0.0",
"python-docx>=0.8.11",
"python-pptx>=0.6.21",
"openpyxl>=3.0.0",
"python-docx>=0.8.11,<2.0.0",
"python-pptx>=0.6.21,<2.0.0",
"openpyxl>=3.0.0,<4.0.0",
]
offline-storage = [
# Storage backend dependencies
"redis>=5.0.0",
"neo4j>=5.0.0",
"pymilvus>=2.6.2",
"pymongo>=4.0.0",
"asyncpg>=0.29.0",
"qdrant-client>=1.7.0",
"redis>=5.0.0,<7.0.0",
"neo4j>=5.0.0,<7.0.0",
"pymilvus>=2.6.2,<3.0.0",
"pymongo>=4.0.0,<5.0.0",
"asyncpg>=0.29.0,<1.0.0",
"qdrant-client>=1.7.0,<2.0.0",
]
offline-llm = [
# LLM provider dependencies
"openai>=1.0.0",
"anthropic>=0.18.0",
"ollama>=0.1.0",
"zhipuai>=2.0.0",
"aioboto3>=12.0.0",
"voyageai>=0.2.0",
"llama-index>=0.9.0",
"transformers>=4.30.0",
"torch>=2.0.0",
"openai>=1.0.0,<2.0.0",
"anthropic>=0.18.0,<1.0.0",
"ollama>=0.1.0,<1.0.0",
"zhipuai>=2.0.0,<3.0.0",
"aioboto3>=12.0.0,<16.0.0",
"voyageai>=0.2.0,<1.0.0",
"llama-index>=0.9.0,<1.0.0",
"transformers>=4.30.0,<5.0.0",
"torch>=2.0.0,<2.3.0",
]
offline = [