Files
ComfyUI-ARM64-Docker/comfyui-rocm-dockerfile
T
derek dccb9cfb4d
Docker Build and Release Upload / build-rocm (push) Failing after 5m20s
init test
2026-04-27 16:57:28 -07:00

63 lines
1.6 KiB
Plaintext

# Use the official ROCm base image
FROM ubuntu:26.04 as reqs
# Set environment variables for 7900 XTX (gfx1100)
ENV PIP_BREAK_SYSTEM_PACKAGES=1
ENV PYTHONUNBUFFERED=1
ENV DEBIAN_FRONTEND=noninteractive
ENV ROCM_PATH=/opt/rocm
ENV PYTORCH_ROCM_ARCH=gfx1100
ENV HIP_VISIBLE_DEVICES=0
ENV PYTORCH_ROCM_ARCH=your_gfx_arch
RUN apt update -y && apt install -y --no-install-recommends \
rocm \
python3-pip \
python3-dev \
python3-torch-rocm \
git \
libgl1 \
libglib2.0-bin \
cmake \
ninja-build \
pkg-config \
libavcodec-dev \
libavformat-dev \
libswresample-dev \
&& rm -rf /var/lib/apt/lists/*
FROM reqs as torch-audio
WORKDIR /builder
RUN git clone https://github.com/pytorch/audio.git && \
cd audio && \
git submodule update --init --recursive && \
# We must ensure it uses the system python/torch
BUILD_ROCM=1 python3 setup.py install && \
cd .. && rm -rf audio
FROM torch-audio as runner
WORKDIR /app
# Clone ComfyUI
RUN git clone https://github.com/comfyanonymous/ComfyUI.git .
# Create sub dependancy
RUN grep -vE 'torch|nvidia|cuda|triton|kornia|spandrel' requirements.txt > req_no_torch.txt
# Install non torch dependant requirements
RUN pip3 install --no-cache-dir --break-system-packages -r req_no_torch.txt
# Manually install the sensitive ones with --no-deps
RUN pip3 install --no-deps --break-system-packages torchsde kornia spandrel
# Setup Manager
WORKDIR /app/custom_nodes
RUN git clone https://github.com/Comfy-Org/ComfyUI-Manager.git
WORKDIR /app
EXPOSE 8188
CMD ["python3", "main.py", "--listen", "0.0.0.0"]