Spaces:
Sleeping
Sleeping
File size: 687 Bytes
c9052d1 3e7b48f c9052d1 3e7b48f c9052d1 3e7b48f 508a561 518de92 299909f 518de92 c9052d1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# 使用基础镜像 ollama/ollama:latest
FROM ollama/ollama
# 执行 apt 更新和安装 python3 和 pip3
RUN apt update && apt install -y python3 && apt install -y python3-pip
# 安装 litellm 和 litellm[proxy],指定豆瓣镜像源
RUN pip3 install litellm
RUN pip3 install 'litellm[proxy]'
RUN curl -fsSL https://ollama.com/install.sh | sh
RUN echo "Pulling"
RUN /bin/ollama pull mistral:instruct
# 设置启动命令(踩坑记录:CMD无法覆盖ollama/ollama镜像的ENTRYPOINT,导致一致报错,改用ENTRYPOINT就可以解决)
# CMD ["litellm", "--model", "ollama/deepseek-llm:67b-chat"]
# 设置ENTRYPOINT
ENTRYPOINT ["litellm", "--model", "ollama/mistral:instruct"] |