본문으로 건너뛰기

AMD ROCm

ROCm 컨테이너

#V This dockerfile is meant to serve as a rocm base image.  It registers the
# debian rocm package repository, and installs the rocm-dev package.
FROM ubuntu:24.04

# Register the ROCM package repository, and install rocm-dev package
ARG ROCM_VERSION=6.4.1
ARG AMDGPU_VERSION=6.4.1

RUN echo "Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600\n" \
> /etc/apt/preferences.d/rocm-pin-600

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
curl \
libnuma-dev \
gnupg \
&& curl -sL https://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - \
&& printf "deb [arch=amd64] https://repo.radeon.com/rocm/apt/$ROCM_VERSION/ noble main" \
| tee /etc/apt/sources.list.d/rocm.list \
&& printf "deb [arch=amd64] https://repo.radeon.com/amdgpu/$AMDGPU_VERSION/ubuntu noble main" \
| tee /etc/apt/sources.list.d/amdgpu.list \
&& apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
sudo \
libelf1 \
kmod \
file \
python3-dev \
python3-pip \
rocm-dev \
build-essential && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN groupadd -g 109 render

rocm = rocm-dev ∪ rocm-libs