autodl基于ubuntu安装ollama
1.在数据盘中新建dockerfile docker.file中新建ollama.dockerfile。AutoDL内置服务 学术加速 在终端中使用:source /etc/network_turbo。在docker.file中下载ollama。
1.在数据盘中新建dockerfile docker.file中新建ollama.dockerfile
ollama.dockerfile:
# 使用 Ubuntu 作为基础镜像 FROM ubuntu:20.04 # 设置环境变量 ENV DEBIAN_FRONTEND=noninteractive # 更新系统并安装必要的依赖项 RUN apt-get update && \ apt-get install -y curl wget gnupg2 lsb-release && \ apt-get clean # 安装 Ollama RUN curl -sSL https://ollama.com/download.sh | sh # 设置 Ollama 的工作目录 WORKDIR /app # 启动 Ollama CMD ["ollama"]
AutoDL内置服务 学术加速 在终端中使用:source /etc/network_turbo
更新系统
apt update apt upgrade
安装必要的依赖
apt-get install -y curl wget gnupg2 lsb-release
在docker.file中下载ollama
curl -fsSL https://ollama.com/install.sh | sh
启动ollama
ollama serve
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)