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

Ubuntu20.04部署Ragflow(Docker方式)

Ubuntu20.04部署Ragflow(Docker方式)

  • Ubuntu20.04 Ragflow
    • Running Ragflow
    • Running Ollama

由于写这篇博客的时候电脑还没装输入法,所以先用半吊子英文顶着了…关于最后运行ollama的部分可以无视,因为我修改了端口所以才需要这么运行

Ubuntu20.04 Ragflow

Running Ragflow

git clone https://github.com/infiniflow/ragflow.git
# check the value of vm.max_map_count
sysctl vm.max_map_count
# Reset vm.max_map_count to a value at least 262144 if it is not.
sudo sysctl -w vm.max_map_count=262144
cd ragflow/docker
docker compose -f docker-compose.yml up -d

problem:

WARN[0000] The "HF_ENDPOINT" variable is not set. Defaulting to a blank string. 
WARN[0000] The "MACOS" variable is not set. Defaulting to a blank string. 
unable to get image 'infiniflow/ragflow:v0.17.2-slim': permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.48/images/infiniflow/ragflow:v0.17.2-slim/json": dial unix /var/run/docker.sock: connect: permission denied

solution:
modify the .env file

RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:nightly-slim

but I found it should be add sudo to the command docker compose -f docker-compose.yml up -d
and another problem:

Error response from daemon: failed to set up container networking: driver failed programming external connectivity on endpoint ragflow-server (a3b939ad7640ae72035b928e912fcae6dddf16255151ca80a62d22d8760a0e49): Bind for 0.0.0.0:80 failed: port is already allocated

it maybe i run dify docker…?

solution: modify ragflow-main\docker\docker-compose.yml about ports

# from
ports:- ${SVR_HTTP_PORT}:9380- 80:80- 443:443
# to
ports:- ${SVR_HTTP_PORT}:9380- 8880:80- 4443:443

url: http://localhost:8880/login

Running Ollama

I changed the port and found something…
this is my ollama service config file:

[Unit]
Description=Ollama Service
After=network-online.target[Service]
ExecStart=/usr/bin/ollama serve
User=ollama
Group=ollama
Restart=always
RestartSec=3
Environment="PATH=$PATH"
Environment="OLLAMA_HOST=0.0.0.0:11451"
OLLAMA_SCHED_SPREAD=1[Install]
WantedBy=default.target

I need to run ollama like this:OLLAMA_HOST=127.0.0.1:11451 ollama run qwq, it works, but why???

It also need a embedding model:

OLLAMA_HOST=127.0.0.1:11451 ollama pull shaw/dmeta-embedding-zh

but still can not config embedding model in ragflow page.

try: modify .env

# from 
RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:v0.17.2-slim
# to
RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:v0.17.2

Reference:

  • RagFlow 部署指南 - 直接拉取镜像

相关文章:

  • Android studio学习之路(八)---Fragment碎片化页面的使用
  • MCP 协议解读:STDIO 高效通信与 JSON-RPC 实战
  • Dify + Mermaid 实现自然语言转图表
  • 第十六届蓝桥杯大赛软件赛省赛第二场 C/C++ 大学 A 组
  • Python 实现从 MP4 视频文件中平均提取指定数量的帧
  • 大端存储与小端存储:数据存储的镜像世界探秘
  • 【昇腾】PaddleOCR转om推理
  • 二分类任务中,统计置信区间
  • Linux下终端命令行安装常见字体示例
  • Unity任务系统笔记
  • springboot入门-业务逻辑核心service层
  • Python-MCPServerStdio开发
  • Unity之基于MVC的UI框架-含案例
  • Linux——动静态库
  • 解决conda虚拟环境安装包却依旧安装到base环境下
  • 模板引擎语法-算术运算
  • springboot集成MyBatis Generator快速开发
  • 河南联通光猫超级管理员账号设置
  • 利用 functools.lru_cache 优化递归算法
  • Spark 极速回顾
  • 湖州通告13批次不合格食品,盒马1批次多宝鱼甲硝唑超标
  • 讲座|现代女性在面对生育、事业与家庭之间的复杂抉择
  • 在县中,我看到“走出去”的渴望与“留下来”的惯性
  • 中国人民对外友好协会代表团访问美国
  • 时代邻里:拟收购成都合达联行科技剩余20%股权
  • 政治局会议:根据形势变化及时推出增量储备政策,加强超常规逆周期调节