本repo提供ollama的Linux版本安装文件,及对应的安装脚本,可在包括在ModelScope Notebook等Linux环境上运行。
当前最新版本(revision v0.6.8)对应ollama v0.6.8 release。可使用 model_revision 切换使用更早的版本。
使用命令行下载
该方式为下载Ollama安装包的推荐方式,能避免而外的git lfs额外数据的下载,整体下载数据大小最小。
# 使用命令行前,需要通过pip install modelscope 安装。
modelscope download --model=gfunsAi/ollama-linux --local_dir ./ollama-linux --revision v0.6.8
通过git clone命令下载
Git下载
#Git clone,可以使用--depth 1选项减少下载的git历史文件
git clone https://www.modelscope.cn/gfunsAi/ollama-linux.git --depth 1 --branch v0.6.8
安装ollama
在通过命令行下载,或者使用git clone下载后,您可以进入ollama-linux文件夹,确定安装脚本具备运行权限后,运行安装脚本,此脚本在本repo clone到本地后,无需网络链接即可安装ollama。
# 运行ollama安装脚本
cd ollama-linux
sudo chmod 777 ./ollama-modelscope-install.sh
./ollama-modelscope-install.sh
更多ollama文档,包括在其他操作系统上安装ollama,可参见ollama 官方网站