From 77bce10941076b13dcfb9fa4f7ec3e3b2c613158 Mon Sep 17 00:00:00 2001 From: Hijak Date: Fri, 20 Nov 2020 21:45:11 +0000 Subject: [PATCH] Dockerfile and kubernetes example --- Dockerfile | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..8764e001 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,43 @@ +FROM nvidia/cuda:11.1-base-ubuntu20.04 + +RUN apt update && DEBIAN_FRONTEND=noninteractive apt install git bzip2 wget unzip python3-pip python3-dev cmake libgl1-mesa-dev python-is-python3 libgtk2.0-dev -yq +ADD . /app +WORKDIR /app +RUN cd Face_Enhancement/models/networks/ &&\ + git clone https://github.com/vacancy/Synchronized-BatchNorm-PyTorch &&\ + cp -rf Synchronized-BatchNorm-PyTorch/sync_batchnorm . &&\ + cd ../../../ + +RUN cd Global/detection_models &&\ + git clone https://github.com/vacancy/Synchronized-BatchNorm-PyTorch &&\ + cp -rf Synchronized-BatchNorm-PyTorch/sync_batchnorm . &&\ + cd ../../ + +RUN cd Face_Detection/ &&\ + wget http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2 &&\ + bzip2 -d shape_predictor_68_face_landmarks.dat.bz2 &&\ + cd ../ + +RUN cd Face_Enhancement/ &&\ + wget https://facevc.blob.core.windows.net/zhanbo/old_photo/pretrain/Face_Enhancement/checkpoints.zip &&\ + unzip checkpoints.zip &&\ + cd ../ &&\ + cd Global/ &&\ + wget https://facevc.blob.core.windows.net/zhanbo/old_photo/pretrain/Global/checkpoints.zip &&\ + unzip checkpoints.zip &&\ + rm -f checkpoints.zip &&\ + cd ../ + +RUN pip3 install numpy + +RUN pip3 install dlib + +RUN pip3 install -r requirements.txt + +RUN git clone https://github.com/NVlabs/SPADE.git + +RUN cd SPADE/ && pip3 install -r requirements.txt + +RUN cd .. + +CMD ["python3", "run.py"]