Skip to content

Instantly share code, notes, and snippets.

@WizardlyBump17
Last active April 26, 2026 22:21
Show Gist options
  • Select an option

  • Save WizardlyBump17/fb454d45aaa108f94b3ca2f67f7c4b72 to your computer and use it in GitHub Desktop.

Select an option

Save WizardlyBump17/fb454d45aaa108f94b3ca2f67f7c4b72 to your computer and use it in GitHub Desktop.
ComfyUI + Python 3.11 + pip
ARG ONEAPI_VERSION=2025.3.2-0-devel-ubuntu24.04
FROM docker.io/intel/deep-learning-essentials:$ONEAPI_VERSION
RUN apt update \
&& add-apt-repository -y ppa:deadsnakes/ppa \
&& apt install -y python3.11 \
&& ln --symbolic --no-target-directory /usr/bin/python3.11 /usr/bin/python
RUN cd /tmp/ \
&& wget https://bootstrap.pypa.io/get-pip.py \
&& python get-pip.py
RUN git clone https://github.com/comfyanonymous/ComfyUI.git
WORKDIR ComfyUI
RUN pip install --pre torch torchvision torchaudio --index-url=https://download.pytorch.org/whl/nightly/xpu \
&& pip install -r requirements.txt
RUN git clone https://github.com/pamparamm/sd-perturbed-attention /ComfyUI/custom_nodes/sd-perturbed-attention \
&& git clone https://github.com/city96/ComfyUI-GGUF.git /ComfyUI/custom_nodes/ComfyUI-GGUF && pip install -r /ComfyUI/custom_nodes/ComfyUI-GGUF/requirements.txt
RUN rm --recursive --force /tmp/* /var/tmp/* \
&& find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \
&& find /var/cache -type f -delete
ENTRYPOINT ["python", "/ComfyUI/main.py"]
services:
comfyui:
image: "localhost/comfyui"
ports:
- "8188:8188"
volumes: #this will create the `comfyui` on the same directory as the docker-compose.yaml. I added this because I want to be able to add models and stuff whenever I want
- "./comfyui/models/:/ComfyUI/models/"
- "./comfyui/output/:/ComfyUI/output/"
- "./comfyui/input/:/ComfyUI/input/"
- "./comfyui/custom_nodes/:/ComfyUI/custom_nodes/"
devices:
- "/dev/dri/renderD128"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment