diff --git a/build/COPY_ROOT/opt/ai-dock/bin/build/layer0/nvidia.sh b/build/COPY_ROOT/opt/ai-dock/bin/build/layer0/nvidia.sh index 3376e721..4198d7d4 100755 --- a/build/COPY_ROOT/opt/ai-dock/bin/build/layer0/nvidia.sh +++ b/build/COPY_ROOT/opt/ai-dock/bin/build/layer0/nvidia.sh @@ -10,8 +10,9 @@ main() { install_comfyui() { micromamba run -n comfyui ${PIP_INSTALL} \ torch=="${PYTORCH_VERSION}" \ - xformers \ nvidia-ml-py3 + + micromamba install -n comfyui -c xformers xformers /opt/ai-dock/bin/update-comfyui.sh } diff --git a/build/COPY_ROOT_EXTRA/opt/ai-dock/bin/build/layer1/init.sh b/build/COPY_ROOT_EXTRA/opt/ai-dock/bin/build/layer1/init.sh index 7bd5e536..bbd286bf 100755 --- a/build/COPY_ROOT_EXTRA/opt/ai-dock/bin/build/layer1/init.sh +++ b/build/COPY_ROOT_EXTRA/opt/ai-dock/bin/build/layer1/init.sh @@ -68,6 +68,14 @@ function build_extra_start() { build_extra_get_models \ "/opt/storage/stable_diffusion/models/esrgan" \ "${ESRGAN_MODELS[@]}" + + cd /opt/ComfyUI && \ + micromamba run -n comfyui -e LD_PRELOAD=libtcmalloc.so python main.py \ + --cpu \ + --listen 127.0.0.1 \ + --port 11404 \ + --disable-auto-launch \ + --quick-test-for-ci } function build_extra_get_nodes() { @@ -85,7 +93,7 @@ function build_extra_get_nodes() { fi else printf "Downloading node: %s...\n" "${repo}" - git clone "${repo}" "${path}" + git clone "${repo}" "${path}" --recursive if [[ -e $requirements ]]; then micromamba -n comfyui run ${PIP_INSTALL} -r "${requirements}" fi diff --git a/build/Dockerfile b/build/Dockerfile index 57e529b6..9dfbc441 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -20,7 +20,7 @@ COPY ./COPY_ROOT/ / ARG IMAGE_BASE RUN /opt/ai-dock/bin/build/layer0/init.sh -ENV OPT_SYNC=ComfyUI:serverless:$OPT_SYNC +ENV OPT_SYNC=ComfyUI:serverless ENV MAMBA_DEFAULT_ENV=comfyui ENV MAMBA_DEFAULT_RUN="micromamba run -n $MAMBA_DEFAULT_ENV" diff --git a/config/provisioning/default.sh b/config/provisioning/default.sh index 13ba05a7..b7dd9c96 100644 --- a/config/provisioning/default.sh +++ b/config/provisioning/default.sh @@ -93,7 +93,7 @@ function provisioning_get_nodes() { fi else printf "Downloading node: %s...\n" "${repo}" - git clone "${repo}" "${path}" + git clone "${repo}" "${path}" --recursive if [[ -e $requirements ]]; then micromamba -n comfyui run ${PIP_INSTALL} -r "${requirements}" fi diff --git a/docker-compose.yaml b/docker-compose.yaml index 3aedf0b8..74878b11 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -5,7 +5,7 @@ services: build: context: ./build args: - IMAGE_BASE: ${IMAGE_BASE:-ghcr.io/ai-dock/jupyter-pytorch:latest-cuda} + IMAGE_BASE: ${IMAGE_BASE:-ghcr.io/ai-dock/jupyter-pytorch:2.1.1-py3.10-cuda-11.8.0-base-22.04} tags: - "ghcr.io/ai-dock/comfyui:${IMAGE_TAG:-latest-jupyter}"