From 72e17a68edf67763e09230a327ee34502e71c122 Mon Sep 17 00:00:00 2001 From: Deng Tian <894949952@qq.com> Date: Sun, 28 Feb 2021 08:36:51 +0800 Subject: [PATCH 1/5] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index feafffb9b..39398b5fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,8 +25,8 @@ WORKDIR /app/avatarify RUN bash scripts/download_data.sh -RUN pip3 install ${PYTORCH_WHEEL} -r requirements.txt \ - && pip3 install ${PYTORCH_WHEEL} -r fomm/requirements.txt \ +RUN pip3 --no-cache-dir install ${PYTORCH_WHEEL} -r requirements.txt \ + && pip3 --no-cache-dir install ${PYTORCH_WHEEL} -r fomm/requirements.txt \ && rm -rf /root/.cache/pip ENV PYTHONPATH="/app/avatarify:/app/avatarify/fomm" From 3e798a5e440e6fe5c2b064bd761c12dfbd7db456 Mon Sep 17 00:00:00 2001 From: Deng Tian <894949952@qq.com> Date: Sun, 28 Feb 2021 14:52:23 +0800 Subject: [PATCH 2/5] Wrap face detection CNN pth into the image --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 39398b5fd..7790ab684 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,9 @@ RUN pip3 --no-cache-dir install ${PYTORCH_WHEEL} -r requirements.txt \ && pip3 --no-cache-dir install ${PYTORCH_WHEEL} -r fomm/requirements.txt \ && rm -rf /root/.cache/pip +RUN mkdir -p /root/.face_alignment/data \ + && curl https://www.adrianbulat.com/downloads/python-fan/s3fd_convert.pth /root/.face_alignment/data/s3fd_convert.pth + ENV PYTHONPATH="/app/avatarify:/app/avatarify/fomm" EXPOSE 5557 From 1542655ea74e249b070fe3de7b75b1ba041d6311 Mon Sep 17 00:00:00 2001 From: Deng Tian <894949952@qq.com> Date: Sun, 28 Feb 2021 15:06:16 +0800 Subject: [PATCH 3/5] Use curl quiet mode --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7790ab684..8b23340d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,7 @@ RUN pip3 --no-cache-dir install ${PYTORCH_WHEEL} -r requirements.txt \ && rm -rf /root/.cache/pip RUN mkdir -p /root/.face_alignment/data \ - && curl https://www.adrianbulat.com/downloads/python-fan/s3fd_convert.pth /root/.face_alignment/data/s3fd_convert.pth + && curl -s https://www.adrianbulat.com/downloads/python-fan/s3fd_convert.pth /root/.face_alignment/data/s3fd_convert.pth ENV PYTHONPATH="/app/avatarify:/app/avatarify/fomm" From 78dea32fbabf1c527f4e1eeb9b0e62bc1afe5df1 Mon Sep 17 00:00:00 2001 From: Deng Tian <894949952@qq.com> Date: Sun, 28 Feb 2021 15:22:44 +0800 Subject: [PATCH 4/5] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8b23340d9..f261e6ed7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,7 @@ RUN pip3 --no-cache-dir install ${PYTORCH_WHEEL} -r requirements.txt \ && rm -rf /root/.cache/pip RUN mkdir -p /root/.face_alignment/data \ - && curl -s https://www.adrianbulat.com/downloads/python-fan/s3fd_convert.pth /root/.face_alignment/data/s3fd_convert.pth + && curl -s https://www.adrianbulat.com/downloads/python-fan/s3fd_convert.pth -o /root/.face_alignment/data/s3fd_convert.pth ENV PYTHONPATH="/app/avatarify:/app/avatarify/fomm" From ebd18fe2cfd60b1f5e805ae08dae31a8cdae05ec Mon Sep 17 00:00:00 2001 From: Deng Tian <894949952@qq.com> Date: Sun, 28 Feb 2021 15:42:56 +0800 Subject: [PATCH 5/5] Add 2DFAN-4.pth pre-download --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f261e6ed7..e7d1a9deb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,8 @@ RUN pip3 --no-cache-dir install ${PYTORCH_WHEEL} -r requirements.txt \ && rm -rf /root/.cache/pip RUN mkdir -p /root/.face_alignment/data \ - && curl -s https://www.adrianbulat.com/downloads/python-fan/s3fd_convert.pth -o /root/.face_alignment/data/s3fd_convert.pth + && curl -s https://www.adrianbulat.com/downloads/python-fan/s3fd_convert.pth -o /root/.face_alignment/data/s3fd_convert.pth \ + && curl -s https://www.adrianbulat.com/downloads/python-fan/2DFAN-4.pth.tar -o /root/.face_alignment/data/2DFAN-4.pth.tar ENV PYTHONPATH="/app/avatarify:/app/avatarify/fomm"