Files
rag/requirements-prod.txt
lacerate551 100d1a06eb init: RAG 知识库服务初始提交
- 后端 API(Flask + Gunicorn)
- RAG 引擎(混合检索 + 云端 Reranker + 引用溯源)
- 文档解析(MinerU + 多格式支持)
- Docker 生产部署配置
- 排除前端项目、敏感配置、模型文件
2026-06-04 17:35:27 +08:00

49 lines
1.8 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# RAG 服务生产环境依赖
# ================================
# 适用场景CPU 服务器部署,无 GPU
# 安装命令:
# pip install torch --index-url https://download.pytorch.org/whl/cpu
# pip install -r requirements-prod.txt -i https://mirrors.aliyun.com/pypi/simple/
# ==================== 核心框架 ====================
flask>=2.0.0 # Web 框架
flask-cors>=4.0.0 # CORS 支持
werkzeug>=2.0.0 # WSGI 工具
gunicorn>=21.0.0 # WSGI 服务器
# ==================== 向量检索 ====================
chromadb>=0.4.0 # 向量数据库
sentence-transformers>=2.2.0 # 向量嵌入模型
rank-bm25>=0.2.2 # BM25 关键词检索
jieba>=0.42.1 # 中文分词
faiss-cpu>=1.7.0 # FAISS 向量索引(语义缓存)
# ==================== Rerank 加速 ====================
optimum[onnxruntime]>=1.14.0 # ONNX RuntimeCPU 推理加速)
# ==================== LLM 调用 ====================
openai>=1.0.0 # LLM API 客户端
requests>=2.28.0 # HTTP 客户端
# ==================== 文档解析(必需) ====================
# MinerU 核心依赖 - PDF/Word/PPT/图片解析
mineru>=3.0.0 # 文档解析核心
# Excel 解析
pandas>=2.0.0
openpyxl>=3.1.0
# 备用解析器可选MinerU 失败时降级)
pdfplumber>=0.10.0
python-docx>=0.8.11
# ==================== 文本处理 ====================
langchain-text-splitters>=0.3.0 # 语义分块器
numpy>=1.24.0
# ==================== 文件监控 ====================
watchdog>=3.0.0 # 文档变更监控
# ==================== 配置管理 ====================
python-dotenv>=1.0.0 # 环境变量