This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user