Spaces:
Running
Running
# 使用官方Python 3.9镜像作为基础镜像 | |
FROM python:3.9 | |
# 安装ffmpeg git | |
RUN apt-get update && \ | |
apt-get install -y ffmpeg git | |
# 克隆GitHub仓库到容器中的/app目录 | |
RUN git clone https://github.com/ZTGeng/ChatGPT-Face.git /app | |
# 设置工作目录 | |
WORKDIR /app | |
# 安装Python依赖 | |
RUN pip install --no-cache-dir -r requirements.txt | |
# copy Wav2Lip预训练模型 | |
RUN mkdir -p wav2lip/weights | |
COPY wav2lip_gan.pth wav2lip/weights/wav2lip_gan.pth | |
# copy google credentials | |
RUN mkdir -p keys | |
ENV GOOGLE_APPLICATION_CREDENTIALS="keys/google-cloud-text-to-speech-key.json" | |
# 暴露Flask运行所需的端口,假设为5000 | |
EXPOSE 5000 | |
# 复制启动脚本到容器 | |
COPY start.sh /start.sh | |
RUN chmod +x /start.sh | |
# 使用启动脚本来运行Flask应用 | |
CMD ["/start.sh"] | |