zhengr commited on
Commit
c9052d1
1 Parent(s): 3e7b48f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -10
Dockerfile CHANGED
@@ -1,13 +1,14 @@
1
- # Dockerfile
2
- FROM quay.io/go-skynet/local-ai:latest
3
 
4
- WORKDIR /app
 
5
 
6
- RUN mkdir models
 
 
7
 
8
- RUN wget -q "https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-GGUF/resolve/main/mistral-7b-instruct-v0.2.Q4_0.gguf" -O models/mistral-7b-instruct-v0.2.Q4_0.gguf
9
- COPY models/* models/
10
-
11
- EXPOSE 8080
12
-
13
- CMD ["--models-path", "/app/models", "--context-size", "4090", "--threads", "4"]
 
1
+ # 使用基础镜像 ollama/ollama:latest
2
+ FROM ollama/ollama
3
 
4
+ # 执行 apt 更新和安装 python3 和 pip3
5
+ RUN apt update && apt install -y python3 && apt install -y python3-pip
6
 
7
+ # 安装 litellm 和 litellm[proxy],指定豆瓣镜像源
8
+ RUN pip3 install litellm
9
+ RUN pip3 install 'litellm[proxy]'
10
 
11
+ # 设置启动命令(踩坑记录:CMD无法覆盖ollama/ollama镜像的ENTRYPOINT,导致一致报错,改用ENTRYPOINT就可以解决)
12
+ # CMD ["litellm", "--model", "ollama/deepseek-llm:67b-chat"]
13
+ # 设置ENTRYPOINT
14
+ ENTRYPOINT ["litellm", "--model", "ollama/mistral:instruct"]