22333Misaka commited on
Commit
116361e
·
verified ·
1 Parent(s): 71907f3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -8
Dockerfile CHANGED
@@ -13,7 +13,7 @@ ENV PYTHONUNBUFFERED=1 \
13
  # 设置工作目录
14
  WORKDIR /app
15
 
16
- # 安装系统依赖 (--- 在这里添加了 curl ---)
17
  RUN apt-get update && \
18
  apt-get install -y --no-install-recommends \
19
  wget curl ffmpeg libsox-dev git \
@@ -43,18 +43,22 @@ RUN python /app/download_support_models.py || true
43
  # --- 从 Hugging Face Spaces 下载您自己的模型权重 ---
44
  ARG GPT_URL="https://huggingface.co/spaces/snsbhg/1111/resolve/main/weights/shantianliang_proplus_e32.ckpt"
45
  ARG SOVITS_URL="https://huggingface.co/spaces/snsbhg/1111/resolve/main/weights/shantianliang_proplus_e8_s192.pth"
46
- RUN mkdir -p /app/pretrained_models/shantianliang
47
- RUN wget -nv "$GPT_URL" -O /app/pretrained_models/shantianliang/shantianliang_proplus_e32.ckpt && \
48
  wget -nv "$SOVITS_URL" -O /app/pretrained_models/shantianliang/shantianliang_proplus_e8_s192.pth
49
 
50
- # 复制参考音频
51
- COPY reference_audio/ /app/reference_audio/
 
 
 
 
52
 
53
- # --- [新] 复制监控和启动脚本 ---
54
  COPY monitor_and_upload.sh /app/monitor_and_upload.sh
55
  COPY start.sh /app/start.sh
56
 
57
- # --- [新] 赋予脚本执行权限 ---
58
  RUN chmod +x /app/start.sh /app/monitor_and_upload.sh
59
 
60
  # 更改 /app 目录所有权
@@ -63,5 +67,5 @@ RUN chown -R 1000:1000 /app
63
  # 暴露 API 端口
64
  EXPOSE 7860
65
 
66
- # --- [修改] 使用 start.sh 脚本作为启动命令 ---
67
  CMD ["/app/start.sh"]
 
13
  # 设置工作目录
14
  WORKDIR /app
15
 
16
+ # 安装系统依赖 (已包含 curl 和 wget)
17
  RUN apt-get update && \
18
  apt-get install -y --no-install-recommends \
19
  wget curl ffmpeg libsox-dev git \
 
43
  # --- 从 Hugging Face Spaces 下载您自己的模型权重 ---
44
  ARG GPT_URL="https://huggingface.co/spaces/snsbhg/1111/resolve/main/weights/shantianliang_proplus_e32.ckpt"
45
  ARG SOVITS_URL="https://huggingface.co/spaces/snsbhg/1111/resolve/main/weights/shantianliang_proplus_e8_s192.pth"
46
+ RUN mkdir -p /app/pretrained_models/shantianliang && \
47
+ wget -nv "$GPT_URL" -O /app/pretrained_models/shantianliang/shantianliang_proplus_e32.ckpt && \
48
  wget -nv "$SOVITS_URL" -O /app/pretrained_models/shantianliang/shantianliang_proplus_e8_s192.pth
49
 
50
+ # --- [修改] 将本地复制改为从URL下载参考音频 ---
51
+ RUN echo "--- Downloading reference audio file ---" && \
52
+ mkdir -p /app/reference_audio && \
53
+ wget -nv "https://huggingface.co/spaces/Awsl1111ddd/cialloapi/raw/main/reference_audio/ref_shantianliang_1.wav" \
54
+ -O /app/reference_audio/ref_shantianliang_1.wav && \
55
+ echo "--- Reference audio downloaded successfully ---"
56
 
57
+ # 复制监控和启动脚本
58
  COPY monitor_and_upload.sh /app/monitor_and_upload.sh
59
  COPY start.sh /app/start.sh
60
 
61
+ # 赋予脚本执行权限
62
  RUN chmod +x /app/start.sh /app/monitor_and_upload.sh
63
 
64
  # 更改 /app 目录所有权
 
67
  # 暴露 API 端口
68
  EXPOSE 7860
69
 
70
+ # 使用 start.sh 脚本作为启动命令
71
  CMD ["/app/start.sh"]