Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +11 -10
Dockerfile
CHANGED
@@ -1,13 +1,14 @@
|
|
1 |
-
#
|
2 |
-
FROM
|
3 |
|
4 |
-
|
|
|
5 |
|
6 |
-
|
|
|
|
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
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"]
|
|
|
|