当前位置:首页 > 本地部署 RAGFlow >

本地部署 RAGFlow

来源 德薄能鲜网
2025-06-24 12:30:55

本地部署 RAGFlow。

  • 0. RAGFlow 是什么?
  • 1. 安装 wsl-ubuntu。
  • 2. (可选)配置清华大学软件源
  • 3. 施工工具的系统更新和安装
  • 4. 安装 Miniconda3。
  • 5. 安装 CUDA Toolkit。
  • 6. 安装 git lfs。
  • 7. 配置 Hugging Face 缓存路径
  • 8. 配置 vm.max_map_count。
  • 9. 安装 Docker Engine。
  • 10. 安装 nginx。
  • 11. 环境变量的配置
  • 12. 安装 libgdiplus。
  • 13. 本地部署 RAGFlow。

0. RAGFlow 是什么?

RAGFlow 基于深度文档理解构建的开源 RAG(Retrieval-Augmented Generation)引擎。RAGFlow 它可以为各种规模的企业和个人提供一套精简的服务 RAG 工作流程与大语言模型相结合(LLM)可靠的问答和合理的引用为用户提供了各种复杂格式的数据。

1. 安装 wsl-ubuntu。

  1. 安装 Ubuntu-默认情况下,将安装在24.04中 C 盘,
wsl.exe --install -d Ubuntu-24.04。
  1. 导出 Ubuntu-24.04,
wsl --export Ubuntu-24.04 D:\tmp\Ubuntu-24.04.tar。
  1. 删除 Ubuntu-24.04,
wsl --unregister Ubuntu-24.04。
  1. 导入 Ubuntu-24.04,导入。 F:\VirtualPCs\Ubuntu-24.04.目录wsl --import Ubuntu-24.04 F:\VirtualPCs\Ubuntu-24.04 D:\tmp\Ubuntu-24.04.tar。
访问 Ubuntu-24.04,
  1. wsl。
退出 Ubuntu-24.04,
  1. exit。
(可选)关闭 Ubuntu-24.04,
  1. wsl --shutdown。
2. (可选)配置清华大学软件源。为加快软件安装速度,配置清华大学软件源,

mv /etc/apt/sources.list /etc/apt/sources.list.bak。

  1. cat << EOF > /etc/apt/sources.list# 默认注释源码镜像改进 apt update 如有必要,注释deb可以自行取消 https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble main restricted universe multiversedeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-updates main restricted universe multiversedeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-updates main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-backports main restricted universe multiversedeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-backports main restricted universe multiverse# 以下安全更新软件源包括官方源和镜像站配置,如有必要,可自行修改注释切换deb http://security.ubuntu.com/ubuntu/ noble-security main restricted universe multiversedeb-src http://security.ubuntu.com/ubuntu/ noble-security main restricted universe multiverse# 不建议预发布软件源# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-proposed main restricted universe multiverse# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-proposed main restricted universe multiverseEOF。
reference: https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/。
3. 系统更新和安装施工工具。

系统更新,

sudo apt update && sudo apt upgrade。

安装施工工具,

sudo apt install build-essential checkinstallsudo apt install libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev。

4. 安装 Miniconda3。

下载 Conda 安装脚本,

cd /tmpwget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh。

  1. 操作安装脚本时,按提示操作,提示是否初始化 Conda 时,输入 “yes”,
bash Miniconda3-latest-Linux-x86_64.sh---Please, press ENTER to continue>>> yesDo you accept the license terms? [yes|no][no] >>> yesminiconda3 will now be installed into this location:/root/miniconda3  - Press ENTER to confirm the location  - Press CTRL-C to abort the installation  - Or specify a different location below[/root/miniconda3] >>> ENTERDo you wish the installer to initialize Miniconda3by running conda init? [yes|no][no] >>> yes---。 [yes|no][no] >>> yes---。
  1. 安装完成后,激活 Conda,
sudo su - root。
  1. 更新 Conda 到最新版本,
conda update conda。
  1. 配置用户登录时是否默认激活? Conda 的 base 如果要默认激活环境,
Conda 的 base 环境,
  1. conda config --set auto_activate_base true。

若不愿默认激活 Conda 的 base 环境,

conda。