ubuntu下ollama及Open WebUI的安装

ollama安装

curl -fsSL https://ollama.com/install.sh | sh

安装之后,系统会自动配置systemd下的service文件,默认为只能本地连接,修改 /etc/systemd/system/ollama.service文件,在ExecStart=/usr/bin/ollama serve上面新增:

Environment="OLLAMA_HOST=0.0.0.0:11434"

然后重新启动系统:

systemctl daemon-reload
systemctl restart ollama

升级ollama同样流程。

Open WebUI的安装

如果与ollama在同一服务器:

docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main

如果与ollama不在同一服务器:

docker run -d -p 3000:8080 -e OLLAMA_BASE_URL=https://example.com -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main

Open WebUI的升级

docker run --rm --volume /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once open-webui

添加新评论