2023-03-28 11:09:31 +08:00
|
|
|
# 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
|
|
|
|
|
2023-03-28 15:09:09 +08:00
|
|
|
RUN apt-get install -y unzip
|
|
|
|
|
|
|
|
RUN mkdir /app
|
|
|
|
RUN mkdir /app/hub/
|
|
|
|
RUN mkdir /app/hub/checkpoints
|
|
|
|
|
2023-03-28 11:27:24 +08:00
|
|
|
WORKDIR /app
|
2023-03-28 15:09:09 +08:00
|
|
|
|
2023-03-28 11:09:31 +08:00
|
|
|
# do this if you are on the chinese server.
|
|
|
|
RUN pip3 config set global.index-url https://pypi.mirrors.ustc.edu.cn/simple/
|
|
|
|
|
2023-03-28 15:09:09 +08:00
|
|
|
# Install packages
|
|
|
|
RUN pip install gradio torch torchvision Pillow gdown numpy scipy cmake onnxruntime-gpu opencv-python-headless
|
2023-03-28 11:27:24 +08:00
|
|
|
|
2023-03-28 15:09:09 +08:00
|
|
|
# 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/
|
2023-03-28 11:09:31 +08:00
|
|
|
|
2023-03-28 15:09:09 +08:00
|
|
|
RUN unzip main.zip
|
2023-03-28 11:09:31 +08:00
|
|
|
|
2023-03-28 15:09:09 +08:00
|
|
|
COPY animeganv2.py /app
|
2023-03-28 11:09:31 +08:00
|
|
|
|
2023-03-28 15:09:09 +08:00
|
|
|
CMD ["python3", "animeganv2.py"]
|