fixes
Docker Build and Release Upload / build-rocm (push) Failing after 6m16s

This commit is contained in:
2026-04-27 17:39:58 -07:00
parent dccb9cfb4d
commit 995672804f
+8 -7
View File
@@ -1,5 +1,5 @@
# Use the official ROCm base image # 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) # Set environment variables for 7900 XTX (gfx1100)
ENV PIP_BREAK_SYSTEM_PACKAGES=1 ENV PIP_BREAK_SYSTEM_PACKAGES=1
@@ -8,7 +8,6 @@ ENV DEBIAN_FRONTEND=noninteractive
ENV ROCM_PATH=/opt/rocm ENV ROCM_PATH=/opt/rocm
ENV PYTORCH_ROCM_ARCH=gfx1100 ENV PYTORCH_ROCM_ARCH=gfx1100
ENV HIP_VISIBLE_DEVICES=0 ENV HIP_VISIBLE_DEVICES=0
ENV PYTORCH_ROCM_ARCH=your_gfx_arch
RUN apt update -y && apt install -y --no-install-recommends \ RUN apt update -y && apt install -y --no-install-recommends \
rocm \ rocm \
@@ -24,20 +23,22 @@ RUN apt update -y && apt install -y --no-install-recommends \
libavcodec-dev \ libavcodec-dev \
libavformat-dev \ libavformat-dev \
libswresample-dev \ libswresample-dev \
build-essential \
g++ \
ninja-build \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
FROM reqs as torch-audio FROM reqs AS torch-audio
WORKDIR /builder WORKDIR /builder
RUN git clone https://github.com/pytorch/audio.git && \ RUN git clone --depth 1 https://github.com/pytorch/audio.git && \
cd audio && \ cd audio && \
git submodule update --init --recursive && \ git submodule update --init --recursive && \
# We must ensure it uses the system python/torch CC=gcc CXX=g++ BUILD_ROCM=1 python3 setup.py install --break-system-packages && \
BUILD_ROCM=1 python3 setup.py install && \
cd .. && rm -rf audio cd .. && rm -rf audio
FROM torch-audio as runner FROM torch-audio AS runner
WORKDIR /app WORKDIR /app