网站首页 > 精选文章 / 正文
一、下载源码
按官方的说明下载源码
git clone https://github.com/infiniflow/ragflow.git
cd ragflow/
二、移除pyicu
pyicu在windows下一直没有编译过,会报如下错误
在pyproject.toml文件中移除pyicu,移除后对项目影响不大。
三、安装依赖
在ragflow目录执行如下命令安装项目依赖
uv sync --python 3.10 --all-extras
四、激活虚拟环境
在ragflow目录执行如下命令激活环境
.\.venv\scripts\activate.bat
五、下载模型
在ragflow目录执行如下命令下载模型
python download_deps.py
注意:下载较慢,可以使用其他方法加快下载进度
下载后需要将nltk_data目录移动到如下目录,不然启动后端服务时会报找不到tokenizers\punkt_tab的错误。
六、启动依赖服务
修改配置文件.\conf\service_conf.yaml中es、mysql、minio、redis的相关参数,然后启动es、mysql、minio、redis服务。其中mysql需要先创建 rag_flow 数据库,不然启动后端服务时会提示找不到rag_flow数据库。
另外:es需要安装8.0以上的版本,不然会报Exception: Elasticsearch version must be greater than or equal to 8, current version: 7
七、启动前端服务
进入web目录,安装前端项目依赖
npm i
完成后运行项目
npm run dev
然后出现如下图,则可以通过浏览器访问
如果运行时报如下错误,则多试几次npm run dev就可以了
error - [plugin: ./node_modules/@umijs/plugins/dist/tailwindcss] tailwindcss generate failed after 5 seconds, please check your tailwind.css and tailwind.config.js
八、启动后端服务(ragflow_server)
打开PyCharm工具,通过如图运行ragflow_server.py。
如果采用如下CMD命令运行,会报ModuleNotFoundError: No module named 'api'错误
python .\api\ragflow_server.py
运行成功后,前端界面就可以注册、登录了。
在启动ragflow_server时,会出现如下两个错误
1、not find model file path det.onnx
首先将ragflow\huggingface.co\InfiniFlow目录的下deepdoc复制到ragflow\rag\res目录
然后按如下图修改ocr.py文件即可
2、Resource punkt_tab not found
将ragflow目录的nltk_data子目录复制到ragflow\.venv\Lib目录即可
九、启动文档解析任务服务(task_executor)
通过如图运行task_executor.py
运行后在前端测试上传文档word和pdf
1、上传word文档,提示在C:\Users\Administrator\.ragflow目录下没有bge-large-zh-v1.5模型
将ragflow\huggingface.co\BAAI目录下的bge-large-zh-v1.5目录复制到C:\Users\Administrator\.ragflow目录即可
2、上传pdf文档,提示ragflow\rag/res/deepdoc\updown_concat_xgb.model": No such file or directory
将ragflow\huggingface.co\InfiniFlow\text_concat_xgb_v1.0目录下的updown_concat_xgb.model文件复制到ragflow\rag\res\deepdoc目录,重新解析文档即可
最后,文档解析成功后,进行聊天测试,能根据知识库回答问题,至此,源代码运行成功!
Tags:minio安装
猜你喜欢
- 2025-05-22 SpringBoot+LayUI后台管理系统开发脚手架
- 2025-05-22 七爪源码:这是在 Go 中进行实时重新加载的好方法
- 2025-05-22 在Windows环境下,本地部署和启动开源项目Ragflow的源代码
- 2025-05-22 开源&Docker:何必nextcloud,新晋神级私人云盘,在线office编辑
- 2025-05-22 打造企业级自动化漏洞修复系统结( GitOps + Trivy + Argo CD )
- 2025-05-22 基于 Open Policy Agent + SPIRE 的零信任架构实战指南》
- 2025-05-22 告别繁琐代码?Maxun:你的无代码网页数据抓取新选择
- 2025-05-22 科技大事件:黑莓第一季度财报公布 亏损2800万美元
- 2025-05-22 玩转大模型必备:milvus向量数据库私有化安装部署及使用介绍
- 2025-05-22 【推荐】一个开源免费、AI 驱动的智能数据管理系统,支持多数据库