From 569fcd8048792ae2e8a9b5c034d8bd4179f04478 Mon Sep 17 00:00:00 2001 From: NULL <50648276+mrhan1993@users.noreply.github.com> Date: Tue, 5 Sep 2023 15:07:36 +0800 Subject: [PATCH] Update Dockerfile (#1195) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除Docker镜像构建时的安装缓存以及禁用Python依赖安装时的缓存。可以降低最终镜像大小 --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index fc1ee26..71240b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,9 +8,9 @@ WORKDIR /app COPY . . -RUN apt update && apt install -y -qq ffmpeg aria2 +RUN apt update && apt install -y -qq ffmpeg aria2 && apt clean -RUN pip3 install -r requirements.txt +RUN pip3 install --no-cache-dir -r requirements.txt RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/D40k.pth -d assets/pretrained_v2/ -o D40k.pth RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/G40k.pth -d assets/pretrained_v2/ -o G40k.pth @@ -26,4 +26,4 @@ RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co VOLUME [ "/app/weights", "/app/opt" ] -CMD ["python3", "infer-web.py"] \ No newline at end of file +CMD ["python3", "infer-web.py"]