Skip to content

Commit c8c01bd

Browse files
committedFeb 4, 2025·
reoptimize Dockerfile for layer cache benefits
1 parent fda54d2 commit c8c01bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ RUN wget https://ffmpeg.org/releases/ffmpeg-4.4.2.tar.gz && \
3535

3636
# this is the final stage
3737
FROM ${CUDA_BASE_CONTAINER} AS runtime
38+
# copy early so that any code changes do not invalidate the cache
39+
COPY --from=ffmpeg /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg
3840

3941
ENV DEBIAN_FRONTEND=noninteractive
4042

@@ -56,7 +58,6 @@ RUN /usr/local/sbin/apt_install_clean.sh gcc python3-pip && \
5658
/usr/local/sbin/apt_remove_clean.sh gcc python3-pip
5759

5860
RUN mkdir -p additional_voices
59-
COPY --from=ffmpeg /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg
6061
CMD ["/usr/bin/python3", "api_v2.py"]
6162
EXPOSE 5000
6263
HEALTHCHECK CMD curl --fail http://localhost:5000 || exit 1

0 commit comments

Comments
 (0)
Please sign in to comment.