From 995672804f858e1d974564e1943c9e443544ce04 Mon Sep 17 00:00:00 2001 From: Derek Holloway Date: Mon, 27 Apr 2026 17:39:58 -0700 Subject: [PATCH] fixes --- comfyui-rocm-dockerfile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/comfyui-rocm-dockerfile b/comfyui-rocm-dockerfile index 707647d..cea5b35 100644 --- a/comfyui-rocm-dockerfile +++ b/comfyui-rocm-dockerfile @@ -1,5 +1,5 @@ # Use the official ROCm base image -FROM ubuntu:26.04 as reqs +FROM ubuntu:26.04 AS reqs # Set environment variables for 7900 XTX (gfx1100) ENV PIP_BREAK_SYSTEM_PACKAGES=1 @@ -8,7 +8,6 @@ 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 \ @@ -24,20 +23,22 @@ RUN apt update -y && apt install -y --no-install-recommends \ libavcodec-dev \ libavformat-dev \ libswresample-dev \ + build-essential \ + g++ \ + ninja-build \ && rm -rf /var/lib/apt/lists/* -FROM reqs as torch-audio +FROM reqs AS torch-audio WORKDIR /builder -RUN git clone https://github.com/pytorch/audio.git && \ +RUN git clone --depth 1 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 && \ + CC=gcc CXX=g++ BUILD_ROCM=1 python3 setup.py install --break-system-packages && \ cd .. && rm -rf audio -FROM torch-audio as runner +FROM torch-audio AS runner WORKDIR /app