Update comfyui image

This commit is contained in:
fapoverflow 2026-01-13 04:01:26 +01:00
parent 7c069d12c4
commit 0b607e72a3
3 changed files with 33 additions and 16 deletions

View file

@ -178,7 +178,7 @@ FROM dev
#FROM pytorch/pytorch:${PYTORCH_VERSION} #FROM pytorch/pytorch:${PYTORCH_VERSION}
# Defines the versions of ComfyUI, ComfyUI Manager, and PyTorch to use # Defines the versions of ComfyUI, ComfyUI Manager, and PyTorch to use
ARG COMFYUI_VERSION=v0.5.1 ARG COMFYUI_VERSION=v0.8.2
#ARG COMFYUI_MANAGER_VERSION=3.35 #ARG COMFYUI_MANAGER_VERSION=3.35
# number of CPU's use for compilation # number of CPU's use for compilation
ARG CPUS=10 ARG CPUS=10
@ -300,6 +300,8 @@ RUN mkdir ~/nv && cd ~/nv && \
RUN cd ~/nv && \ RUN cd ~/nv && \
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg/ && \ git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg/ && \
cd ffmpeg && \ cd ffmpeg && \
CFLAGS="-D_POSIX_C_SOURCE=200112L -D_GNU_SOURCE -I/usr/local/cuda/include" \
LDFLAGS="-L/usr/local/cuda/lib64" \
./configure \ ./configure \
--enable-nonfree \ --enable-nonfree \
--enable-nvenc \ --enable-nvenc \

View file

@ -1,6 +1,6 @@
ARG SWARMUI_VERSION=0.9.7-Beta ARG SWARMUI_VERSION=0.9.7-Beta
ARG COMFYUI_VERSION=v0.3.59 ARG COMFYUI_VERSION=v0.8.2
ARG COMFYUI_MANAGER_VERSION=3.35 #ARG COMFYUI_MANAGER_VERSION=3.35
ARG DOTNET_VERSION=9.0-bookworm-slim ARG DOTNET_VERSION=9.0-bookworm-slim
#ARG DOTNET_VERSION=8.0-bookworm-slim #ARG DOTNET_VERSION=8.0-bookworm-slim
ARG ASPNET_VERSION=9.0-bookworm-slim ARG ASPNET_VERSION=9.0-bookworm-slim
@ -31,6 +31,9 @@ FROM mcr.microsoft.com/dotnet/aspnet:${ASPNET_VERSION}
ARG SWARM_PATH ARG SWARM_PATH
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV USER_NAME="root"
#ENV USER="swarmui"
ENV GROUP_NAME="root"
ARG SWARMUI_USER_ID=1000 ARG SWARMUI_USER_ID=1000
ARG SWARMUI_GROUP_ID=1000 ARG SWARMUI_GROUP_ID=1000
@ -38,13 +41,15 @@ ARG GPU_TYPE="nv"
ENV NVIDIA_VISIBLE_DEVICES=all ENV NVIDIA_VISIBLE_DEVICES=all
ENV CLI_ARGS="" ENV CLI_ARGS=""
RUN addgroup --gid $SWARMUI_GROUP_ID swarmui && \ #RUN addgroup --gid $SWARMUI_GROUP_ID swarmui && \
adduser --uid $SWARMUI_USER_ID --gid $SWARMUI_GROUP_ID --gecos "" --disabled-password swarmui # adduser --uid $SWARMUI_USER_ID --gid $SWARMUI_GROUP_ID --gecos "" --disabled-password swarmui
COPY --from=build ${SWARM_PATH} "${SWARM_PATH}/" COPY --from=build ${SWARM_PATH} "${SWARM_PATH}/"
RUN mkdir -p "${SWARM_PATH}/Data" && \ RUN mkdir -p "${SWARM_PATH}/Data"
chown -R swarmui:swarmui ${SWARM_PATH} RUN chown -R $(id -u):$(id -g) ${SWARM_PATH}
#RUN chown -R ${USER_NAME}:${GROUP_NAME} ${SWARM_PATH}
#RUN chown -R swarmui:swarmui ${SWARM_PATH}
ENV HOME=${SWARM_PATH} ENV HOME=${SWARM_PATH}
RUN --mount=type=cache,target=/var/cache/apt \ RUN --mount=type=cache,target=/var/cache/apt \
@ -68,15 +73,18 @@ RUN git clone --depth=1 https://github.com/comfyanonymous/ComfyUI.git /opt/comfy
git checkout FETCH_HEAD git checkout FETCH_HEAD
RUN git clone --depth=1 https://github.com/Comfy-Org/ComfyUI-Manager.git /opt/comfyui-manager && \ RUN git clone --depth=1 https://github.com/Comfy-Org/ComfyUI-Manager.git /opt/comfyui-manager && \
cd /opt/comfyui-manager && \ cd /opt/comfyui-manager
git fetch origin ${COMFYUI_MANAGER_VERSION} && \ # cd /opt/comfyui-manager && \
git checkout FETCH_HEAD # git fetch origin ${COMFYUI_MANAGER_VERSION} && \
# git checkout FETCH_HEAD
WORKDIR ${SWARM_PATH} WORKDIR ${SWARM_PATH}
RUN chown -R swarmui:swarmui /opt/comfyui RUN chown -R $(id -u):$(id -g) /opt/comfyui
#RUN chown -R ${USER_NAME}:${GROUP_NAME} /opt/comfyui
RUN git config --global --add safe.directory /opt/comfyui RUN git config --global --add safe.directory /opt/comfyui
ENV COMFYUI_PATH="/SwarmUI/dlbackend/ComfyUI" ENV COMFYUI_PATH="/SwarmUI/dlbackend/ComfyUI"
#ENV COMFYUI_PATH="/SwarmUI/dlbackend/ComfyUI"
ENV CUSTOM_NODES_PATH="/SwarmUI/dlbackend/ComfyUI/custom_nodes" ENV CUSTOM_NODES_PATH="/SwarmUI/dlbackend/ComfyUI/custom_nodes"
# Pre-install previously used custom nodes requirements from volume # Pre-install previously used custom nodes requirements from volume
@ -85,10 +93,14 @@ COPY comfy-install-linux.sh ${SWARM_PATH}/launchtools/
RUN chmod +x ${SWARM_PATH}/launchtools/comfy-install-linux.sh && \ RUN chmod +x ${SWARM_PATH}/launchtools/comfy-install-linux.sh && \
${SWARM_PATH}/launchtools/comfy-install-linux.sh ${GPU_TYPE} ${SWARM_PATH}/launchtools/comfy-install-linux.sh ${GPU_TYPE}
RUN chown -R swarmui:swarmui ${COMFYUI_PATH}/venv # Reapplied again bc of permissions issues, maybe related to a symlink/docker/windows bug RUN chown -R $(id -u):$(id -g) ${SWARM_PATH}
#RUN chown -R ${USER_NAME}:${GROUP_NAME} /opt/comfyui
#RUN chown -R swarmui:swarmui ${SWARM_PATH} # Reapplied again bc of permissions issues, maybe related to a symlink/docker/windows bug
#RUN chown -R swarmui:swarmui ${COMFYUI_PATH} # Reapplied again bc of permissions issues, maybe related to a symlink/docker/windows bug
#RUN chown -R swarmui:swarmui ${COMFYUI_PATH}/venv # Reapplied again bc of permissions issues, maybe related to a symlink/docker/windows bug
ENV PATH="${COMFYUI_PATH}/venv/bin:$PATH" ENV PATH="${COMFYUI_PATH}/venv/bin:$PATH"
ENV PYTHONPATH="${CUSTOM_NODES_PATH}:\${PYTHONPATH}" ENV PYTHONPATH="${CUSTOM_NODES_PATH}:\${PYTHONPATH}"
USER swarmui #USER swarmui
EXPOSE 7801 EXPOSE 7801
COPY entrypoint.sh / COPY entrypoint.sh /

View file

@ -82,11 +82,14 @@ fi
echo "install general requirements..." echo "install general requirements..."
$python -s -m pip install --no-cache-dir \ $python -s -m pip install --no-cache-dir \
triton \
sageattention \
opencv-python \ opencv-python \
diffusers \ diffusers \
psutil triton \
torchsde \
nvidia-ml-py \
sageattention \
psutil \
nvitop
# Installs the required Python packages for both ComfyUI and the ComfyUI Manager # Installs the required Python packages for both ComfyUI and the ComfyUI Manager
$python -s -m pip install --no-cache-dir \ $python -s -m pip install --no-cache-dir \