核心:在本地和远程服务器之间建立一个安全的隧道,实现端口转发
需要用到的命令:
#建立隧道
ssh -CNg -L 11434:127.0.0.1:11434 root@【audodl机器IP】 -p 【autodl ssh端口】
#linux安装ollama
curl -fsSL https://ollama.com/install.sh | sh
注意事项:
1、autoDL的机器在下载ollama的时候,会有warning,需要解决
apt update #更新安装源
apt install pciutils lshw #确保GPU支持
2、手动启动Ollama
ollama serve
或者让它在后台运行:
ollama serve &
3、隧道建立后,手动修改应用到的模型