leezhuuu commited on
Commit
fbdb003
·
verified ·
1 Parent(s): 01e21f9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -7
Dockerfile CHANGED
@@ -21,7 +21,8 @@
21
 
22
 
23
  # 构建阶段
24
- FROM python:3.12 as builder
 
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-decode
37
 
38
  # 运行阶段
39
- FROM python:3.12-slim
40
 
41
  WORKDIR /app
42
  COPY --from=builder /app/.venv /app/.venv
43
- COPY --from=builder /app/glm-4-Voice-decode /app/glm-4-Voice-decode
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"] # 或者你的启动脚本