ztgeng commited on
Commit
825680e
1 Parent(s): 5cc477c

init project

Browse files
Files changed (3) hide show
  1. Dockerfile +33 -0
  2. start.sh +7 -0
  3. wav2lip_gan.pth +3 -0
Dockerfile ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 使用官方Python 3.9镜像作为基础镜像
2
+ FROM python:3.9
3
+
4
+ # 安装ffmpeg git
5
+ RUN apt-get update && \
6
+ apt-get install -y ffmpeg git
7
+
8
+ # 克隆GitHub仓库到容器中的/app目录
9
+ RUN git clone https://github.com/ZTGeng/ChatGPT-Face.git /app
10
+
11
+ # 设置工作目录
12
+ WORKDIR /app
13
+
14
+ # 安装Python依赖
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # copy Wav2Lip预训练模型
18
+ RUN mkdir -p wav2lip/weights
19
+ COPY wav2lip_gan.pth wav2lip/weights/wav2lip_gan.pth
20
+
21
+ # copy google credentials
22
+ RUN mkdir -p keys
23
+ ENV GOOGLE_APPLICATION_CREDENTIALS="keys/google-cloud-text-to-speech-key.json"
24
+
25
+ # 暴露Flask运行所需的端口,假设为5000
26
+ EXPOSE 5000
27
+
28
+ # 复制启动脚本到容器
29
+ COPY start.sh /start.sh
30
+ RUN chmod +x /start.sh
31
+
32
+ # 使用启动脚本来运行Flask应用
33
+ CMD ["/start.sh"]
start.sh ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ # 将环境变量的内容写入凭证文件
3
+ echo $GOOGLE_APPLICATION_CREDENTIALS_JSON
4
+ echo $GOOGLE_APPLICATION_CREDENTIALS_JSON > /app/keys/google-cloud-text-to-speech-key.json
5
+
6
+ # 启动 Flask 应用
7
+ exec flask run --host=0.0.0.0
wav2lip_gan.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca9ab7b7b812c0e80a6e70a5977c545a1e8a365a6c49d5e533023c034d7ac3d8
3
+ size 435801865