animeganv2/Dockerfile

30 lines
1.1 KiB
Docker

# please visit https://github.com/xfyun/aiges/releases to get stable and suitable iamges.
FROM public.ecr.aws/iflytek-open/aiges-gpu:11.6-1.17-3.9.13-ubuntu1804-v2.0.0-rc6
RUN apt-get install -y unzip
RUN mkdir /app
RUN mkdir /app/hub/
RUN mkdir /app/hub/checkpoints
WORKDIR /app
# do this if you are on the chinese server.
RUN pip3 config set global.index-url https://pypi.mirrors.ustc.edu.cn/simple/
# Install packages
RUN pip install gradio torch torchvision Pillow gdown numpy scipy cmake onnxruntime-gpu opencv-python-headless
# Download images
ADD https://github.com/gradio-app/gradio/raw/main/demo/animeganv2/gongyoo.jpeg /app
ADD https://github.com/gradio-app/gradio/raw/main/demo/animeganv2/groot.jpeg /app
ADD https://github.com/AK391/animegan2-pytorch/archive/main.zip /app/hub
ADD https://github.com/bryandlee/animegan2-pytorch/raw/main/weights/face_paint_512_v2.pt /app/hub/checkpoints/
ADD https://github.com/bryandlee/animegan2-pytorch/raw/main/weights/face_paint_512_v1.pt /app/hub/checkpoints/
RUN unzip main.zip
COPY animeganv2.py /app
CMD ["python3", "animeganv2.py"]