链载Ai
标题: Ragflow v0.16部署实践 [打印本页]
作者: 链载Ai 时间: 5 小时前
标题: Ragflow v0.16部署实践
ingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;" class="list-paddingleft-1">基于 Docker 部署:ingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;" class="list-paddingleft-1">- 前置条件:需要满足一定的硬件配置,如 CPU ≥ 4 核,RAM ≥ 16 GB,Disk ≥ 50 GB,同时安装 Docker ≥ 24.0.0 与 Docker Compose ≥ v2.26.1。
- 操作步骤:首先克隆 RAGFlow 的仓库,进入其 Docker 文件夹,利用提前编译好的 Docker 镜像启动服务器。启动成功后,通过浏览器访问指定地址进行注册登录。
ingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;" class="list-paddingleft-1">基于 Kubernetes 部署:RAGFlow 官方提供了 Kubernetes 部署的文档,这种方式适合在大规模分布式环境中部署 RAGFlow,能够更好地管理资源和扩展服务。ingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 12px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;">
ingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 12px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;">RAGFlow 与 LLM 集成方式ingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;" class="list-paddingleft-1">通过 Ollama 集成:ingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;" class="list-paddingleft-1">- 安装 Ollama:Ollama 是一款本地化运行大语言模型的开源工具,可在本地创建、运行和管理多种模型。安装完成后,使用 ollama pull 命令下载所需的 LLM 模型。
- 在 RAGFlow 中添加 LLM 模型:在 RAGFlow 的界面中找到模型供应商,选择 Ollama 并添加模型。如果 RAGFlow 部署为 Docker,需要映射 Docker 外面的地址。
ingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;" class="list-paddingleft-1">通过 API 集成:ingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;" class="list-paddingleft-1">- 配置 LLM 的 API:在 RAGFlow 的界面中,点击右上角的 logo 进入 Model providers 页面,点击所需的 LLM 并更新其 API 密钥。
- 选择默认模型:点击 System Model Settings,选择默认的对话模型、嵌入模型等。
ingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;" class="list-paddingleft-1">通过本地部署的 LLM 集成:RAGFlow 支持部署 LLMs 本地使用,除了 Ollama,还可以使用 Xinference 或 LocalAI,但具体的集成方法需要根据这些工具的文档进行操作。
镜像加速
dockerpullregistry.cn-hangzhou.aliyuncs.com/megadotnet/docker.elastic.co.elasticsearch.elasticsearch:8.11.3&&dockertagregistry.cn-hangzhou.aliyuncs.com/megadotnet/docker.elastic.co.elasticsearch.elasticsearch:8.11.3docker.elastic.co/elasticsearch/elasticsearch:8.11.3dockerpullregistry.cn-hangzhou.aliyuncs.com/megadotnet/infiniflow.ragflow:v0.16.0&&dockertagregistry.cn-hangzhou.aliyuncs.com/megadotnet/infiniflow.ragflow:v0.16.0infiniflow/ragflow:v0.16.0dockerpullregistry.cn-hangzhou.aliyuncs.com/megadotnet/infiniflow.ragflow:v0.16.0-slim&&dockertagregistry.cn-hangzhou.aliyuncs.com/megadotnet/infiniflow.ragflow:v0.16.0-sliminfiniflow/ragflow:v0.16.0-slimdockerpullregistry.cn-hangzhou.aliyuncs.com/megadotnet/mysql:8.0.39&&dockertagregistry.cn-hangzhou.aliyuncs.com/megadotnet/mysql:8.0.39mysql:8.0.39dockerpullregistry.cn-hangzhou.aliyuncs.com/megadotnet/valkey.valkey:8&&dockertagregistry.cn-hangzhou.aliyuncs.com/megadotnet/valkey.valkey:8valkey/valkey:8dockerpullregistry.cn-hangzhou.aliyuncs.com/megadotnet/quay.io.minio.minio:RELEASE.2023-12-20T01-00-02Z&&dockertagregistry.cn-hangzhou.aliyuncs.com/megadotnet/quay.io.minio.minio:RELEASE.2023-12-20T01-00-02Zquay.io/minio/minio:RELEASE.2023-12-20T01-00-02Z
infiniflow/ragflow:v0.16.0 镜像是9GB磁盘空间占用
$ sudo sysctl -w vm.max_map_count=262144
$ cd ragflow $ docker compose -f docker/docker-compose.yml up -d


https://ragflow.io/docs/dev/
初始资源情况


Q&A 问答对内容都写到一个 EXCEL 表格(第一列放问题,第二列是答案)

一、数据安全与隐私保护
数据隔离
通过私有Docker部署Ragflow,可以实现数据的物理隔离,确保企业私有数据不会泄露给外部或第三方。
隐私保护
对于敏感数据或隐私信息,私有Docker部署提供了更高的安全保障,避免了数据在公共网络上的传输和存储风险。
二、高效利用资源
节省网络带宽
私有Docker仓库可以避免每次都从外部仓库下载镜像,从而节省了网络带宽资源。
提高访问速度
由于私有仓库通常部署在公司内部网络,因此Ragflow的访问速度会更快,提高了工作效率。
三、灵活性与可扩展性
定制化需求
私有Docker部署允许企业根据自身需求对Ragflow进行定制化配置和优化,以满足特定的业务需求。
可扩展性
随着业务的发展,私有Docker部署可以轻松地扩展Ragflow的规模和性能,以适应不断增长的数据量和用户需求。
四、集成与协同
与其他系统集成
私有Docker部署使得Ragflow可以更容易地与其他企业系统进行集成,实现数据的共享和协同工作。
团队协作
通过私有Docker部署,团队成员可以更方便地共享和协作处理Ragflow相关的任务和数据。
五、成本节约
降低长期成本
虽然私有Docker部署的初期成本可能较高,但长期来看,由于避免了外部仓库的使用费用和潜在的数据泄露风险,因此可以降低整体成本。
提高ROI
通过高效的资源利用和定制化配置,私有Docker部署可以提高Ragflow的投资回报率(ROI)
| 欢迎光临 链载Ai (https://www.lianzai.com/) |
Powered by Discuz! X3.5 |