Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +7 -7
Dockerfile
CHANGED
@@ -21,7 +21,8 @@
|
|
21 |
|
22 |
|
23 |
# 构建阶段
|
24 |
-
|
|
|
25 |
|
26 |
WORKDIR /app
|
27 |
COPY . /app
|
@@ -29,20 +30,19 @@ COPY . /app
|
|
29 |
RUN python -m venv .venv
|
30 |
ENV PATH="/app/.venv/bin:$PATH"
|
31 |
RUN pip install --upgrade pip
|
32 |
-
RUN pip install --no-cache-dir distutils
|
33 |
RUN pip install --no-cache-dir -r requirements.txt
|
34 |
RUN apt-get update && apt-get install -y git-lfs
|
35 |
RUN git lfs install
|
36 |
-
RUN git clone https://huggingface.co/THUDM/glm-4-Voice-
|
37 |
|
38 |
# 运行阶段
|
39 |
-
FROM python:3.
|
40 |
|
41 |
WORKDIR /app
|
42 |
COPY --from=builder /app/.venv /app/.venv
|
43 |
-
COPY --from=builder /app/glm-4-Voice-
|
44 |
-
COPY --from=builder /app/web_demo.py /app/
|
45 |
|
46 |
ENV PATH="/app/.venv/bin:$PATH"
|
47 |
EXPOSE 8888
|
48 |
-
CMD [".venv/bin/python", "web_demo.py"]
|
|
|
21 |
|
22 |
|
23 |
# 构建阶段
|
24 |
+
# 构建阶段
|
25 |
+
FROM python:3.11 as builder
|
26 |
|
27 |
WORKDIR /app
|
28 |
COPY . /app
|
|
|
30 |
RUN python -m venv .venv
|
31 |
ENV PATH="/app/.venv/bin:$PATH"
|
32 |
RUN pip install --upgrade pip
|
|
|
33 |
RUN pip install --no-cache-dir -r requirements.txt
|
34 |
RUN apt-get update && apt-get install -y git-lfs
|
35 |
RUN git lfs install
|
36 |
+
RUN git clone https://huggingface.co/THUDM/glm-4-Voice-decoder
|
37 |
|
38 |
# 运行阶段
|
39 |
+
FROM python:3.11-slim
|
40 |
|
41 |
WORKDIR /app
|
42 |
COPY --from=builder /app/.venv /app/.venv
|
43 |
+
COPY --from=builder /app/glm-4-Voice-decoder /app/glm-4-Voice-decoder
|
44 |
+
COPY --from=builder /app/web_demo.py /app/ # 或者你的启动脚本
|
45 |
|
46 |
ENV PATH="/app/.venv/bin:$PATH"
|
47 |
EXPOSE 8888
|
48 |
+
CMD [".venv/bin/python", "web_demo.py"] # 或者你的启动脚本
|