docker下载网站:https://download.docker.com/linux/static/stable/
mkdir /project && cd /project
wget https://download.docker.com/linux/static/stable/x86_64/docker-28.0.1.tgz
tar -xvf docker-28.0.1.tgz
# 赋予执行权限
chmod 755 -R docker
# copy到bin目录
cp docker/* /usr/bin/
# 删除原始文件
rm -rf docker-28.0.1.tgz
rm -rf docker
注册docker为系统服务
vim /etc/systemd/system/docker.service
覆盖原来的文件
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target
[Service]
Type=notify
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=0
RestartSec=2
ExecStartPost=/usr/sbin/iptables -P FORWARD ACCEPT
Restart=always
TimeoutStartSec=0
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
Delegate=yes
KillMode=process
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target
配置国内镜像源
vim /etc/docker/daemon.json
覆盖原来的文件
{
"registry-mirrors": [
"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.m.daocloud.io",
"https://docker.nju.edu.cn",
"https://docker.mirrors.sjtug.sjtu.edu.cn",
"https://docker.mirrors.ustc.edu.cn",
"https://mirror.iscas.ac.cn",
"https://docker.rainbond.cc"
]
}
至此docker安装完成,可以直接启动docker或检查是否安装成功
docker --version
# 启动docker
systemctl start docker
2.安装docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
设置权限
sudo chmod +x /usr/local/bin/docker-compose
是否安装成功:
docker-compose --version
运行下面这段代码报错:
docker-compose -f docker-compose.yml up -d
WARNING: The HF_ENDPOINT variable is not set. Defaulting to a blank string.
WARNING: The MACOS variable is not set. Defaulting to a blank string.
ERROR: The Compose file './docker-compose.yml' is invalid because:
'include' does not match any of the regexes: '^x-'
解决方法:
卸载docker-compose,手动安装aarch64-github最新版本
sudo apt remove docker-compose -y
wget https://ghproxy.com/https://github.com/docker/compose/releases/download/v2.32.4/docker-compose-linux-aarch64
移动到系统目录
mv docker-compose-linux-aarch64 /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose --version
重新运行刚刚这段代码,等待下载镜像
docker-compose -f docker-compose.yml up -d
ragflow-server下载失败...
linux上安装Ollama:
docker run --name ollama -p 11434:11434 ollama/ollama
确保Ensure Ollama is listening on all IP address:
sudo ss -tunlp | grep 11434
运行ollama
docker start ollama
docker ps-a
拉模型
(llm) [root@localhost deep-searcher]# sudo docker exec ollama ollama pull qwen3:0.6b
pulling manifest
pulling 7f4030143c1c: 100% ▕██████████████████▏ 522 MB
pulling eb4402837c78: 100% ▕██████████████████▏ 1.5 KB
pulling d18a5cc71b84: 100% ▕██████████████████▏ 11 KB
pulling cff3f395ef37: 100% ▕██████████████████▏ 120 B
pulling b0830f4ff6a0: 100% ▕██████████████████▏ 490 B
verifying sha256 digest
writing manifest
success
(llm) [root@localhost Qwen]# sudo docker exec ollama ollama pull bge-m3
pulling manifest
pulling daec91ffb5dd: 100% ▕██████████████████▏ 1.2 GB
pulling a406579cd136: 100% ▕██████████████████▏ 1.1 KB
pulling 0c4c9c2a325f: 100% ▕██████████████████▏ 337 B
verifying sha256 digest
writing manifest
success
如果 RAGFlow 在 Docker 中运行,则 localhost 在 RAGFlow Docker 容器内将映射为 host.docker.internal。如果 Ollama 在同一主机上运行,则 Ollama 的正确 URL 应为“http://host.docker.internal:11434/”,并且您应该使用以下命令检查是否可以从 RAGFlow 容器内部访问 Ollama:
$ sudo docker exec -it ragflow-server bash
$ curl http://host.docker.internal:11434/
> Ollama is running
如果 RAGFlow 是从源代码启动的,并且 Ollama 与 RAGFlow 在同一台主机上运行,请检查是否可以从 RAGFlow 的主机访问 Ollama:
$ curl http://localhost:11434/
> Ollama is running
输入指令但是报错
(llm) [root@localhost docker]# docker compose -f docker-compose.yml up -d
unknown shorthand flag: 'f' in -f
解决方法:
换个指令输入,指令docker-compose up -d
(llm) [root@localhost docker]# docker-compose up -d
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.
[+] Running 5/5
✔ Container ragflow-es-01 Running 0.0s
✔ Container ragflow-minio Running 0.0s
✔ Container ragflow-mysql Healthy 0.5s
✔ Container ragflow-redis Running 0.0s
✔ Container ragflow-server Started
查看状态docker ps -a --format "table {{.ID}}\t{{.Status}}\t{{.Ports}}\t{{.Names}}" | grep ragflow
成功运行
(llm) [root@localhost docker]# docker ps -a --format "table {{.ID}}\t{{.Status}}\t{{.Ports}}\t{{.Names}}" | grep ragflow
201d4acc0c64 Restarting (1) Less than a second ago ragflow-server
f8138efb2396 Up 12 minutes (healthy) 9300/tcp, 0.0.0.0:1200->9200/tcp, :::1200->9200/tcp ragflow-es-01
cf2271315a21 Up 20 seconds 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp ragflow-redis
264e0b128d89 Up 20 seconds 0.0.0.0:9000-9001->9000-9001/tcp, :::9000-9001->9000-9001/tcp ragflow-minio
07b92c713348 Up 20 seconds (healthy) 33060/tcp, 0.0.0.0:5455->3306/tcp, :::5455->3306/tcp ragflow-mysql 0.0s
但又出现问题:ragflow-server一直Restarting服务未启动成功,并且无法启动服务,报错如下:
查了很久的文档:
应该是ragflow-server架构的问题
The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
查看ragflow-server的架构版本:发现不符合,ragflow-server是amd64架构的,
docker image inspect swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:v0.18.0
也没有对应的镜像源来提供下载,需要在openEuler这个系统上使用源码来构建....
(llm) [root@localhost docker]# docker pull --platform=linux/arm64 wqferan/ragflow:v0.14.0-arm64
Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
故得出结论:无法配置!
reference:
https://blog.csdn.net/m0_72313250/article/details/146038917
https://blog.csdn.net/hknaruto/article/details/145668187
https://ragflow.io/docs/dev/deploy_local_llm
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。