Skip to content

Commit 142f2ac

Browse files
committed
Don't rebuild whole image when APT_EXTRA_PACKAGES changes
1 parent 05a6eb9 commit 142f2ac

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
# Use the recommended Python version 3.12, as specified in the README.
66
FROM python:3.12.11-bookworm AS comfyui-base
77

8-
ARG APT_EXTRA_PACKAGES
9-
108
# Install cmake, which is an indirect installation dependencies
119
RUN apt-get update && apt-get install -y --no-install-recommends cmake
1210

@@ -72,12 +70,13 @@ VOLUME [ "/data", "/comfyui/.venv", "/comfyui/custom_nodes", "/comfyui/models",
7270
# dependencies
7371
USER root
7472

75-
# Install additional system dependencies
76-
RUN apt-get install -y --no-install-recommends $APT_EXTRA_PACKAGES \
77-
&& apt-get clean \
78-
&& rm -rf /var/lib/apt/lists/*
79-
8073
# Configure entrypoint
8174
RUN chmod +x entrypoint.sh
8275
ENTRYPOINT [ "./entrypoint.sh" ]
8376
CMD [ "python", "./main.py" ]
77+
78+
# Install additional system dependencies
79+
ARG APT_EXTRA_PACKAGES
80+
RUN apt-get install -y --no-install-recommends $APT_EXTRA_PACKAGES \
81+
&& apt-get clean \
82+
&& rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)