yzwwxm commited on
Commit
c1f37a8
·
verified ·
1 Parent(s): ff1e270

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -9
Dockerfile CHANGED
@@ -11,15 +11,21 @@ RUN apt-get update && \
11
  rm -rf /var/lib/apt/lists/*
12
 
13
 
14
- # 将当前目录中的所有文件复制到容器的/app目录下
15
- COPY . .
16
 
17
- # 安装Python依赖
 
 
 
 
 
 
18
  RUN pip install --no-cache-dir -r requirements.txt
19
- RUN mkdir static
20
- RUN chmod 777 static
21
- # 暴露应用程序运行的端口(如果需要)
22
- # EXPOSE 8000
23
 
24
- # 运行应用程序
25
- CMD ["python", "main.py"]
 
 
 
 
 
 
 
11
  rm -rf /var/lib/apt/lists/*
12
 
13
 
 
 
14
 
15
+ # 克隆 GitHub 仓库
16
+ RUN git clone https://github.com/jianchang512/kokoro-uiapi /app/kokoro-uiapi
17
+
18
+ # 切换到克隆的目录
19
+ WORKDIR /app/kokoro-uiapi
20
+
21
+ # 安装 Python 依赖
22
  RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
23
 
24
+ # 替换 app.py 中的 /v1 为 /api
25
+ RUN sed -i 's|/v1|/api|g' app.py
26
+
27
+ # 暴露端口(如果需要)
28
+ EXPOSE 5066
29
+
30
+ # 启动应用程序
31
+ CMD ["python", "app.py"]