Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +6 -2
Dockerfile
CHANGED
@@ -3,14 +3,18 @@
|
|
3 |
# ------------------------------------------------------------------
|
4 |
FROM python:3.11-alpine
|
5 |
|
6 |
-
#
|
7 |
RUN apk add --no-cache \
|
8 |
ca-certificates \
|
9 |
wget \
|
10 |
git \
|
11 |
libstdc++ \
|
|
|
12 |
&& update-ca-certificates
|
13 |
|
|
|
|
|
|
|
14 |
# 复制并安装本地 wheel(你已放在项目根目录)
|
15 |
COPY llama_cpp_python-0.3.2-cp311-cp311-linux_x86_64.whl /tmp/
|
16 |
RUN pip install --no-cache-dir /tmp/llama_cpp_python-0.3.2-cp311-cp311-linux_x86_64.whl
|
@@ -18,7 +22,7 @@ RUN pip install --no-cache-dir /tmp/llama_cpp_python-0.3.2-cp311-cp311-linux_x86
|
|
18 |
# 安装其他 Python 依赖
|
19 |
RUN pip install --no-cache-dir gradio huggingface-hub
|
20 |
|
21 |
-
#
|
22 |
RUN rm -f /tmp/llama_cpp_python-0.3.2-cp311-cp311-linux_x86_64.whl
|
23 |
|
24 |
# 模型路径 / ENV(按你之前配置)
|
|
|
3 |
# ------------------------------------------------------------------
|
4 |
FROM python:3.11-alpine
|
5 |
|
6 |
+
# 安装运行时依赖(加上 libgomp 和 libstdc++)
|
7 |
RUN apk add --no-cache \
|
8 |
ca-certificates \
|
9 |
wget \
|
10 |
git \
|
11 |
libstdc++ \
|
12 |
+
libgomp \
|
13 |
&& update-ca-certificates
|
14 |
|
15 |
+
# 升级 pip/setuptools/wheel
|
16 |
+
RUN pip install --upgrade pip setuptools wheel
|
17 |
+
|
18 |
# 复制并安装本地 wheel(你已放在项目根目录)
|
19 |
COPY llama_cpp_python-0.3.2-cp311-cp311-linux_x86_64.whl /tmp/
|
20 |
RUN pip install --no-cache-dir /tmp/llama_cpp_python-0.3.2-cp311-cp311-linux_x86_64.whl
|
|
|
22 |
# 安装其他 Python 依赖
|
23 |
RUN pip install --no-cache-dir gradio huggingface-hub
|
24 |
|
25 |
+
# 清理临时文件
|
26 |
RUN rm -f /tmp/llama_cpp_python-0.3.2-cp311-cp311-linux_x86_64.whl
|
27 |
|
28 |
# 模型路径 / ENV(按你之前配置)
|