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

Ragflow服务器上部署教程

参考官方文档进行整理

克隆相应代码

git clone https://github.com/infiniflow/ragflow.git

修改vm.max_map_count

sudo sysctl -w vm.max_map_count=262144

修改 daemon.json文件

{"registry-mirrors": ["https://docker.m.daocloud.io","https://0dj0t5fb.mirror.aliyuncs.com","https://docker.mirrors.ustc.edu.cn","https://6kx4zyno.mirror.aliyuncs.com","https://registry.docker-cn.com","https://docker.registry.cyou","https://docker-cf.registry.cyou","https://dockercf.jsdelivr.fyi","https://docker.jsdelivr.fyi","https://dockertest.jsdelivr.fyi","https://mirror.aliyuncs.com","https://dockerproxy.com","https://mirror.baidubce.com","https://docker.nju.edu.cn","https://docker.mirrors.sjtug.sjtu.edu.cn","https://mirror.iscas.ac.cn","https://docker.rainbond.cc","https://do.nark.eu.org","https://dc.j8.work","https://gst6rzl9.mirror.aliyuncs.com","http://hub-mirror.c.163.com","http://mirrors.ustc.edu.cn/","https://mirrors.tuna.tsinghua.edu.cn/","http://mirrors.sohu.com/"],"insecure-registries": ["registry.docker-cn.com","docker.mirrors.ustc.edu.cn"],"debug": true,"experimental": false,"runtimes": {"nvidia": {"args": [],"path": "nvidia-container-runtime"}}
}

重新加载

sudo systemctl daemon-reload 
sudo systemctl enable docker

进入Docker目录进行相应修改

修改.env文件

首先修改镜像的内容,我们这里修改为v0.18.0

RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:v0.17.2

可选修改:
如果服务器有配置Dify,.env文件的REDIS_PORT也需要修改

修改.yml文件

我们这里修改的是docker-compose-gpu.yml这一个文件

主要修改端口的相关映射

# The RAGFlow team do not actively maintain docker-compose-gpu.yml, so use them at your own risk. 
# Pull requests to improve it are welcome.
include:- ./docker-compose-base.ymlservices:ragflow:depends_on:mysql:condition: service_healthyimage: ${RAGFLOW_IMAGE}container_name: ragflow-serverports:- ${SVR_HTTP_PORT}:9380- 80:80    **主要修改这里,比如用8080去映射80,修改前面的80即可,4443去映射443**- 443:443   volumes:- ./ragflow-logs:/ragflow/logs- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf- ./nginx/proxy.conf:/etc/nginx/proxy.conf- ./nginx/nginx.conf:/etc/nginx/nginx.confenv_file: .envenvironment:- TZ=${TIMEZONE}- HF_ENDPOINT=${HF_ENDPOINT}- MACOS=${MACOS}networks:- ragflowrestart: on-failure# https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration# If you're using Docker Desktop, the --add-host flag is optional. This flag makes sure that the host's internal IP gets exposed to the Prometheus container.extra_hosts:- "host.docker.internal:host-gateway"deploy:resources:reservations:devices:- driver: nvidiacount: all #多卡部署的情况,这里也需要修改设为1或者0capabilities: [gpu]

服务器启动

docker logs -f ragflow-server

控制台出现相关日志,无报错,通过http://ip地址即可进行访问,出现以下地址即说明成功
在这里插入图片描述

相关文章:

  • 已经写好论文的AI率降低
  • VTK|结合qt创建通用按钮控制显隐(边框、坐标轴、点线面)
  • 嵌入式学习--江协51单片机day1
  • 【HDLBits刷题】Verilog Language——1.Basics
  • 代码随想录算法训练营总结篇
  • Kubernetes弹性伸缩:让应用自动应对流量洪峰与低谷
  • 购物|电商购物小程序|基于微信小程序的购物系统设计与实现(源码+数据库+文档)
  • OpenKylin安装Elastic Search8
  • k8s node 内存碎片化如何优化?
  • 文件上传漏洞篇:upload-labs靶场搭建
  • Ubuntu 系统中解决 Firefox 中文显示乱码的完整指南
  • 代码随想录算法训练营第五十六天| 图论2—卡码网99. 岛屿数量(dfs bfs)
  • 养生融入生活,畅享健康人生
  • MySQL8查询某个JSON类型的字段中出现过的所有键名(json key name)并去重返回
  • conda虚拟环境相关操作
  • 第三章:langchain加载word文档构建RAG检索教程(基于FAISS库为例)
  • Spring Boot项目集成Aviator实现成本计算模块
  • 【阿里云大模型高级工程师ACP习题集】3 总结与展望
  • vscode远程服务器连接----过程尝试写入的管道不存在
  • 修改MySQL枚举类型添加‘location‘值
  • 纪念苏联伟大卫国战争胜利80周年阅兵彩排,解放军仪仗队亮相
  • 抗战回望20︱《山西省战区抗敌行政工作检讨会议议决案》:“强民政治”、“说服行政”
  • 十四届全国政协原常委、民族和宗教委员会原副主任苟仲文被提起公诉
  • 无人机穿越大理崇圣寺千年古塔时“炸机”,当地:肇事者已找到,将被追责
  • 《中国医药指南》就“宫颈癌等论文出现男性病例”致歉:辞退涉事编辑
  • “五一”假期国内出游3.14亿人次,同比增长6.4%