FROM harbor.5jstore.com:8020/common/nvidia-cuda:nvidia-cuda11.3.0-python38-ubuntu18.04-pytorch1.12.1-v2
LABEL maintainer="zhouchengbo@wmdigit.com"

ARG DEBIAN_FRONTEND=noninteractive

# 安装系统依赖
RUN sed -i 's/archive.ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
RUN apt-get update && apt-get install -y fonts-wqy-zenhei

# 安装python模块
COPY requirements.txt /app/
WORKDIR /app
RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/

# Install GFPGAN
# RUN pip install git+https://github.com/TencentARC/GFPGAN
COPY ./app/ai_gen_video/GFPGAN-master /app/app/ai_gen_video/GFPGAN-master
WORKDIR /app/app/ai_gen_video/GFPGAN-master
RUN python setup.py install

# Install CLIP
# RUN pip install git+https://github.com/openai/CLIP.git
COPY ./app/ai_gen_image/CLIP-main /app/app/ai_gen_image/CLIP-main
WORKDIR /app/app/ai_gen_image/CLIP-main
RUN python setup.py install

ENV PATH="$PATH:/usr/local/python3/bin"

WORKDIR /app