当前位置: 首页 > news >正文

Docker 运行RAGFlow 搭建RAG知识库

借鉴视频:DeepSeek 10分钟完全本地部署 保姆级教程 断网运行 无惧隐私威胁 大语言模型 CPU GPU 混合推理32B轻松本地部署!DeepSeek模拟王者!!_哔哩哔哩_bilibili

借鉴博客:RAGFlow搭建全攻略:从入门到精通,轻松构建RAG知识库-CSDN博客

环境要求:RAGFlow 运行内存需要 > 8G,硬盘需要  > 20G,CPU 内核 > 4

运行性能展示:

本地部署的环境: ollama 部署在 window 本地, RAGFlow 部署在虚拟机 Redhat 环境

Linux 系统安装 Docker

本地虚拟机  Redhat 9.0系统

# 编辑 docker源
cd /etc/yum.repos.d/
vim docker-ce.repo
# 输入下面信息
[docker]name=dockerbaseurl=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/rhel/9/x86_64/stable/gpgcheck=0 
dnf makecache# 安装docker
dnf search docker
dnf install docker-ce.x86_64# 卸载 podman 冲突
rpm -qa |grep podman
rpm -e podman-docker-4.2.0-3.el9.noarch --nodeps
rpm -qa |grep runc
rpm -e runc-1.1.4-1.el9.x86_64 --nodeps启动:
systemctl enable --now docker
systemctl start docker# 运行docker
[root@AI docker]# docker pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
e6590344b1a5: Pull complete
Digest: sha256:940c619fbd418f9b2b1b63e25d8861f9cc1b46e3fc8b018ccfe8b78f19b8cc4f
Status: Downloaded newer image for hello-world:latest
docker.io/library/hello-world:latest

安装中遇到的问题:

问题1:
[root@AI yum.repos.d]# docker pull hello-world
Using default tag: latest
Cannot connect to the Docker daemon at unix:///run/podman/podman.sock. Is the docker daemon running?

# 添加权限, 然后 reboot
sudo usermod -aG docker ${USER}


问题2:
 docker pull hello-world
Using default tag: latest
Error response from daemon: Get "https://registry-1.docker.io/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)


vim /etc/docker/daemon.json
# 添加下面信息 
{
  "registry-mirrors" : [
    "https://docker.nju.edu.cn",
    "https://docker.mirrors.sjtug.sjtu.edu.cn"
  ],
  "insecure-registries" : [
    "docker.mirrors.ustc.edu.cn"
  ],
  "debug": true,
  "experimental": false
}

# 重启服务  
sudo systemctl restart docker

搭建RAGFlow 环境:

# 克隆代码库
git clone https://github.com/infiniflow/ragflow.git# 修改.env文件, 使用完整版
# 第84行:# RAGFLOW_IMAGE=infiniflow/ragflow:v0.16.0-slim
# 第87行:RAGFLOW_IMAGE=infiniflow/ragflow:v0.16.0cd ragflow/docker
# 启动服务
docker compose -f docker-compose.yml up -d# 查看运行状态
docker logs -f ragflow-server

遇到的问题:

安装成功效果展示

运行完成:

查看运行日志:

访问目标环境地址:

注册登录即可

登录页面选择 ollama 模型

选择 chat 类型,模型名称输入已部署 ollama名称及地址

查看另一台环境部署的 ollama:

# 查看模型名称
ollama list
NAME                 ID              SIZE      MODIFIED
deepseek8b:latest    07c360b6bd34    4.9 GB    18 hours ago# 容许访问,以windows 为例
window:  [Environment]::SetEnvironmentVariable("OLLAMA_HOST", "0.0.0.0", "Machine")
关闭防火墙端口 New-NetFirewallRule -DisplayName "Ollama API" -Direction Inbound -Action Allow -Protocol TCP -LocalPort 11434

(确认后运行时间稍长,需要等待 10分钟... )

 Embedding 模型用于知识库的向量转换

创建知识库

编写配置.

 上传测试知识库文件,本地上传的华为交换机命令文档

 

 

效果展示:

创建聊天:

 运行结果确认:

 PS: 关联不太大,确实有点智障,当然可能和配置的大模型有关系,后续继续学习吧

http://www.lqws.cn/news/475039.html

相关文章:

  • LeapMotion-PhysicalHandsManager 类详解
  • 7.5.1散列表的基本概念
  • 测试工程师实战:用 LangChain+deepseek构建多轮对话测试辅助聊天机器人
  • 深入解析Flink Local模式启动流程源码:揭开作业初始化的神秘面纱
  • vue3 el-table 行颜色根据 字段改变
  • 企业级安全实践:SSL 加密与权限管理(二)
  • python 常见数学公式函数使用详解
  • 【HarmonyOS Next之旅】DevEco Studio使用指南(三十六) -> 配置构建(三)
  • swift-17-字面量协议、模式匹配、条件编译
  • Java 21 的虚拟线程与桥接模式:构建高性能并发系统
  • Kafka Streams入门与实战:从概念解析到程序开发
  • 架构总结记录
  • VSCode性能调优:从卡顿到丝滑的终极方案
  • C++法则11:没有“顶层 const 引用“
  • 16_设备树中的remote-endpoint演示基于视频字符设备Linux内核模块
  • 深度实战|星环OS三大创新场景解密:如何用确定性技术重构智能汽车安全与体验?
  • Unity高性能无GC图表
  • RSA加密原理及推导
  • 跨个体预训练与轻量化Transformer在手势识别中的应用:Bioformer
  • 深入解析ID3算法:信息熵驱动的决策树构建基石
  • 为车辆提供路径规划解决方案:技术演进、挑战与未来蓝图
  • 微处理器原理与应用篇---CISCRISC指令集架构
  • 2025最新Python 100个常用函数在线体验项目
  • 索引——高效查询的关键
  • python中学物理实验模拟:凸透镜成像和凹透镜成像
  • Python 的内置函数 hash
  • `shallowReactive` 与 `shallowRef`:浅层响应式 API
  • 从零开发ComfyUI插件:打造你的AI绘画专属工具
  • CMAKE
  • wordpress外贸独立站常用留言表单插件 contact form 7