mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-05 01:10:22 +08:00
optimize(dockerfile): 将"copy . ."移至系统设置之后 (#1937)
将Dockerfile中的"copy . ."指令移至系统设置之后的副作用是构建过程现在将在复制文件之前缓存层。 这意味着如果系统设置保持不变,后续构建将更快,因为将重用缓存的层。 optimize(dockerfile): Moved "copy . ." after system setup The side effect of moving the "copy . ." instruction after the system setup in the Dockerfile is that the build process will now cache the layers before copying the files. This means that if the system setup remains unchanged, subsequent builds will be faster as the cached layers will be reused.
This commit is contained in:
@@ -6,15 +6,12 @@ EXPOSE 7865
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# Install dependenceis to add PPAs
|
# Install dependenceis to add PPAs
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y -qq ffmpeg aria2 && apt clean && \
|
apt-get install -y -qq ffmpeg aria2 && apt clean && \
|
||||||
apt-get install -y software-properties-common && \
|
apt-get install -y software-properties-common && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Add the deadsnakes PPA to get Python 3.9
|
# Add the deadsnakes PPA to get Python 3.9
|
||||||
RUN add-apt-repository ppa:deadsnakes/ppa
|
RUN add-apt-repository ppa:deadsnakes/ppa
|
||||||
|
|
||||||
@@ -28,6 +25,8 @@ RUN apt-get update && \
|
|||||||
# Set Python 3.9 as the default
|
# Set Python 3.9 as the default
|
||||||
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
|
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
RUN python3 -m pip install --no-cache-dir -r requirements.txt
|
RUN python3 -m pip 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/D40k.pth -d assets/pretrained_v2/ -o D40k.pth
|
||||||
|
|||||||
Reference in New Issue
Block a user