ubuntu安装deepseek
1、安装ollama
curl -fsSL https://ollama.com/install.sh | sh
Download Ollama on Linux
2、安装 deepseek,选择合适大小的,因为显存大
ollama run deepseek-r1:70b
deepseek-r1
3、设置ollama监听端口
sudo vim /etc/systemd/system/ollama.service
Environment="OLLAMA_HOST=0.0.0.0"
Environment="OLLAMA_ORIGINS=*"
systemctl daemon-reload
systemctl restart ollama
[2024-06]-[大模型]-[DEBUG]- ollama webui 11434 connection refused_connection error: cannot connect to host host.dock-CSDN博客
4、安装open-webui
docker run -d -p 3000:8080 -e OLLAMA_BASE_URL=http://127.0.0.1:11434 -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
第一个是管理员,可以在管理员界面设置允许用户注册,并且开放模型权限。
如果涉及到docker删除,然后再启动容器
docker stop openweb-ui
docker rm openweb-ui
如果涉及到需要常驻显存
sudo vim /etc/systemd/system/ollama.service
OLLAMA_KEEP_ALIVE=-1
systemctl daemon-reload
systemctl restart ollama