I am trying to install comfyui on a ubuntu vm via the docker image and get the followwing error. I have already done some work to get to this point but I can't get it to run.
# For build automation - Allows building from any ai-dock base image
# Use a *cuda*base* image as default because pytorch brings the libs
ARG IMAGE_BASE="ghcr.io/ai-dock/pytorch:2.2.1-py3.12-cuda-12.1.0-runtime-22.04"
FROM ${IMAGE_BASE}
LABEL org.opencontainers.image.source https://github.com/ai-dock/comfyui
LABEL org.opencontainers.image.description "ComfyUI Stable Diffusion backend and GUI"
LABEL maintainer="Rob Ballantyne <rob@dynamedia.uk>"
#ARG PYTHON_VERSION="3.10"
#ENV PYTHON_VERSION=${PYTHON_VERSION}
#ARG PYTORCH_VERSION="2.2.1"
#ENV PYTORCH_VERSION="${PYTORCH_VERSION}"
#ARG COMFYUI_SHA
#ENV COMFYUI_SHA=${COMFYUI_SHA}
ENV IMAGE_SLUG="comfyui"
ENV OPT_SYNC=ComfyUI:serverless
# Copy early so we can use scripts in the build - Changes to these files will invalidate the cache and cause a rebuild.
COPY --chown=0:1111 ./COPY_ROOT/ /
# Use build scripts to ensure we can build all targets from one Dockerfile in a single layer.
# Don't put anything heavy in here - We can use multi-stage building above if necessary.
ARG IMAGE_BASE
RUN set -eo pipefail && /opt/ai-dock/bin/build/layer0/init.sh | tee /var/log/build.log
# Must be set after layer0
ENV MAMBA_DEFAULT_ENV=comfyui
ENV MAMBA_DEFAULT_RUN="micromamba run -n $MAMBA_DEFAULT_ENV"
# Copy overrides and models into later layers for fast rebuilds
COPY --chown=0:1111 ./COPY_ROOT_EXTRA/ /
RUN set -eo pipefail && /opt/ai-dock/bin/build/layer1/init.sh | tee -a /var/log/build.log
# Keep init.sh as-is and place additional logic in /opt/ai-dock/bin/preflight.sh
CMD ["init.sh"]
And this my docker-compose file:
version: "3.8"
# Compose file build variables set in .env
services:
supervisor:
platform: linux/amd64
build:
context: ./build
args:
IMAGE_BASE: ${IMAGE_BASE:-ghcr.io/ai-dock/pytorch:2.2.1-py3.12-cuda-12.1.0-runtime-22.04}
#tags:
# - "ghcr.io/ai-dock/comfyui:${IMAGE_TAG:-jupyter-pytorch-2.2.0-py3.10-cuda-11.8.0-runtime-22.04}"
image: ghcr.io/ai-dock/comfyui:${IMAGE_TAG:-pytorch-2.2.1-py3.12-cuda-12.1.0-runtime-22.04}
## For Nvidia GPU's - You probably want to uncomment this
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
restart: unless-stopped
devices:
- "/dev/dri:/dev/dri"
## For AMD GPU
#- "/dev/kfd:/dev/kfd"
volumes:
## Workspace
- ./workspace:${WORKSPACE:-/workspace/}:rshared
# You can share /workspace/storage with other non-ComfyUI containers. See README
#- /path/to/common_storage:${WORKSPACE:-/workspace/}storage/:rshared
# Will echo to root-owned authorized_keys file;
# Avoids changing local file owner
- ./config/authorized_keys:/root/.ssh/authorized_keys_mount
- ./config/provisioning/default.sh:/opt/ai-dock/bin/provisioning.sh
ports:
# SSH available on host machine port 2222 to avoid conflict. Change to suit
- ${SSH_PORT_HOST:-2222}:22
# Caddy port for service portal
- ${SERVICEPORTAL_PORT_HOST:-1111}:${SERVICEPORTAL_PORT_HOST:-1111}
# ComfyUI web interface
- ${COMFYUI_PORT_HOST:-8188}:${COMFYUI_PORT_HOST:-8188}
# Jupyter server
- ${JUPYTER_PORT_HOST:-8888}:${JUPYTER_PORT_HOST:-8888}
# Rclone webserver for interactive configuration
- ${RCLONE_PORT_HOST:-53682}:${RCLONE_PORT_HOST:-53682}
I think the rest of the docker-compose is irrelevant to know.
Could someone help me withmy problem please ?
I am trying to install comfyui on a ubuntu vm via the docker image and get the followwing error. I have already done some work to get to this point but I can't get it to run.
This is my Dockerfile:
And this my docker-compose file:
I think the rest of the docker-compose is irrelevant to know. Could someone help me withmy problem please ?