Don't rebuild whole image when APT_EXTRA_PACKAGES changes

This commit is contained in:
B. Bergeron 2025-08-25 23:12:14 -04:00
parent 4fff4dc032
commit ab4a2a575e
No known key found for this signature in database
GPG Key ID: 20A0A88F22238925

View File

@ -5,8 +5,6 @@
# Use the recommended Python version 3.12, as specified in the README.
FROM python:3.12.11-bookworm AS comfyui-base
ARG APT_EXTRA_PACKAGES
# Install cmake, which is an indirect installation dependencies
RUN apt-get update && apt-get install -y --no-install-recommends cmake
@ -72,12 +70,13 @@ VOLUME [ "/data", "/comfyui/.venv", "/comfyui/custom_nodes", "/comfyui/models",
# dependencies
USER root
# Install additional system dependencies
RUN apt-get install -y --no-install-recommends $APT_EXTRA_PACKAGES \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Configure entrypoint
RUN chmod +x entrypoint.sh
ENTRYPOINT [ "./entrypoint.sh" ]
CMD [ "python", "./main.py" ]
# Install additional system dependencies
ARG APT_EXTRA_PACKAGES
RUN apt-get install -y --no-install-recommends $APT_EXTRA_PACKAGES \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*