Ollama默认会把模型现在到系统分区,容易造成系统分区空间不足,可以用如下方法快捷的将其模型存储位置设置到其他空间比较大的分区
操作方法
使用以下命令来设置 Ollama 的模型下载位置并重启服务:
sudo systemctl set-environment OLLAMA_MODELS=/home/yourusername/.ollama/ollama && \ sudo systemctl stop ollama && sudo systemctl start ollama
检验状态
sudo systemctl status ollama
sudo systemctl show-environment | grep OLLAMA_MODELS