使用Flowise、OneAPI、Ollama搭建本地知识库问题,首选你要准备三台虚拟机,分别将这三种应用进行部署,默认使用的操作系统Ubuntu22.04。
一、搭建Ollama服务器
配置PVE虚拟机,Ollama要求有GPU卡24G或更高,内存建议32GB,当然越大越好。
安装英伟GPU的驱动,如何在ubuntu22.04上安装nvidia gpu卡,请自行搜索安装。
搭建Ollama服务器,请参考:https://ollama.com/download/linux
curl -fsSL https://ollama.com/install.sh | sh
配置跨域访问:
vim /etc/systemd/system/ollama.service
[Unit]
Description=Ollama Service
After=network-online.target
[Service]
ExecStart=/usr/bin/ollama serve
User=ollama
Group=ollama
Restart=always
RestartSec=3
Environment="OLLAMA_HOST=0.0.0.0"
Environment="OLLAMA_ORIGINS=*"
[Install]
WantedBy=default.target
修改ollama.service文件,如上代码。
#重新加载systemd守护进程并启用Ollama服务
sudo systemctl daemon-reload
sudo systemctl enable ollama
sudo systemctl start ollama
二、搭建OneAPI服务器
要求4G内存,CPU设置1-2个都可以。
1、搭建OneAPI服务器请参考: