Ubuntu 安装 RAGFlow 简单流程

Docker拉取镜像慢可以更换镜像源

sudo tee /etc/docker/daemon.json <<-'EOF'
{
    "registry-mirrors": [
    "https://docker.m.daocloud.io",
    "https://docker.imgdb.de",
    "https://docker-0.unsee.tech",
    "https://docker.hlmirror.com",
    "https://cjie.eu.org"
    ]
}
EOF

重启docker服务

sudo systemctl daemon-reload 
sudo systemctl restart docker
 

  1. 确保 vm.max_map_count 不小于 262144:

    如需确认 vm.max_map_count 的大小:

    $ sysctl vm.max_map_count

    如果 vm.max_map_count 的值小于 262144,可以进行重置:

    # 这里我们设为 262144:
    $ sudo sysctl -w vm.max_map_count=262144

    你的改动会在下次系统重启时被重置。如果希望做永久改动,还需要在 /etc/sysctl.conf 文件里把 vm.max_map_count 的值再相应更新一遍:

    vm.max_map_count=262144
  2. 克隆仓库:

    $ git clone https://github.com/infiniflow/ragflow.git
    $ cd ragflow/docker
    
    #通过设置 RAGFLOW_IMAGE=infiniflow/ragflow:v0.17.2 来下载ragflow:v0.17.2完整发行版
    $ vim .env
    ​
    # The RAGFlow Docker image to download.
    # Defaults to the v0.17.2-slim edition, which is the RAGFlow Docker image without embedding models.
    # RAGFLOW_IMAGE=infiniflow/ragflow:v0.17.2-slim
    # To download the RAGFlow Docker image with embedding models, uncomment the following line instead:
    RAGFLOW_IMAGE=infiniflow/ragflow:v0.17.2
  3. 进入 docker 文件夹,利用提前编译好的 Docker 镜像启动服务器:

   #国内镜像源下载ragflow:v0.17.2
   $ docker pull swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/infiniflow/ragflow:v0.17.2
​
   $ cd ragflow/docker
   $ chmod +x ./entrypoint.sh
   # Use CPU for embedding and DeepDoc tasks:
   $ docker compose -f docker-compose.yml up -d
​
   # To use GPU to accelerate embedding and DeepDoc tasks:
   # docker compose -f docker-compose-gpu.yml up -d

如果你遇到 Docker 镜像拉不下来的问题,可以在 docker/.env 文件内根据变量 RAGFLOW_IMAGE 的注释提示选择华为云或者阿里云的相应镜像。

  • 华为云镜像名:swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow

  • 阿里云镜像名:registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow

  1. 服务器启动成功后再次确认服务器状态:

    $ docker logs -f ragflow-server
  2. 在你的浏览器中输入你的服务器对应的 IP 地址并登录 RAGFlow。

    上面这个例子中,您只需输入 http://IP_OF_YOUR_MACHINE 即可:未改动过配置则无需输入端口(默认的 HTTP 服务端口 80)。

你可能感兴趣的:(ubuntu,linux,RAGFlow)