Spaces:
Running
Running
File size: 1,257 Bytes
825680e 2238e4e 825680e 04617a3 450cb5e 04617a3 825680e 2238e4e 825680e 450cb5e 825680e e1079a7 1ff2f5e 825680e 5ea04c8 b9db9dd bf6b0b5 450cb5e 9397fb5 825680e 450cb5e 825680e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# 使用官方Python 3.9镜像作为基础镜像
FROM python:3.9
# 安装ffmpeg git
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y ffmpeg git
# 克隆GitHub仓库到容器中的/app目录
RUN git clone https://github.com/ZTGeng/ChatGPT-Face.git /app
# 设置工作目录
WORKDIR /app
# 复制外部网页文件到容器中
COPY --chown=user delay_message_en.html static/delay_message_en.html
COPY --chown=user delay_message_zh.html static/delay_message_zh.html
# 安装Python依赖
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# copy Wav2Lip预训练模型
RUN mkdir -p wav2lip/weights
COPY --chown=user wav2lip_gan.pth wav2lip/weights/wav2lip_gan.pth
# copy google credentials
RUN mkdir -p keys
RUN chmod -R 777 /app/keys
RUN mkdir -p temp
RUN chmod -R 777 /app/temp
ENV GOOGLE_APPLICATION_CREDENTIALS="keys/google-cloud-text-to-speech-key.json"
ENV NUMBA_CACHE_DIR=/tmp/numba_cache
# ENV NUMBA_DISABLE_JIT=1
# RUN chmod -R 755 /usr/local/lib/python3.9/site-packages/librosa
# 暴露Flask运行所需的端口
EXPOSE 7860
# 复制启动脚本到容器
COPY --chown=user start.sh /start.sh
RUN chmod +x /start.sh
# 使用启动脚本来运行Flask应用
CMD ["/start.sh"]
|