55 lines
1.7 KiB
Docker
55 lines
1.7 KiB
Docker
FROM ubuntu:22.04
|
|
ARG ROCM_VERSION="5.7.1"
|
|
ARG ROCM_APT_CODE_NAME="jammy"
|
|
ARG ROCBLAS_BRANCH="release/rocm-rel-5.7"
|
|
ARG DEBIAN_FRONTEND="noninteractive"
|
|
|
|
# Install essentials
|
|
RUN <<EOF
|
|
apt-get update
|
|
apt-get install -y --no-install-recommends wget git ca-certificates curl gnupg sudo libelf1 libnuma-dev build-essential vim-nox cmake-curses-gui kmod file
|
|
apt-get clean
|
|
rm -rf /var/lib/apt/lists/*
|
|
EOF
|
|
|
|
# Add ROCm apt repo
|
|
RUN <<EOF
|
|
mkdir --parents --mode=0755 /etc/apt/keyrings
|
|
wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | gpg --dearmor | tee /etc/apt/keyrings/rocm.gpg > /dev/null
|
|
bash -c 'echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/${ROCM_VERSION} ${ROCM_APT_CODE_NAME} main" > "/etc/apt/sources.list.d/rocm.list"'
|
|
bash -c 'echo -e "Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600" | tee /etc/apt/preferences.d/rocm-pin-600'
|
|
EOF
|
|
|
|
# Install ROCm
|
|
RUN <<EOF
|
|
apt-get update
|
|
apt-get install -y --no-install-recommends rocm-dev
|
|
apt-get clean
|
|
rm -rf /var/lib/apt/lists/*
|
|
EOF
|
|
|
|
# WORKDIR /root
|
|
# RUN git clone -b ${ROCBLAS_BRANCH} https://github.com/ROCmSoftwarePlatform/rocBLAS.git
|
|
# WORKDIR /root/rocBLAS
|
|
# RUN rm -rf library/src/blas3/Tensile/Logic/asm_full/r9nano/
|
|
|
|
# # gfx803 as single target will cause error
|
|
# RUN sed -i -e 's/rmake.py --install/rmake.py -a="gfx803;gfx900" --install/g' install.sh
|
|
|
|
# RUN ./install.sh -d --cmake_install
|
|
# WORKDIR /root
|
|
|
|
## need to fix broken version
|
|
|
|
# Create non-root user
|
|
RUN <<EOF
|
|
echo "%sudo ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/sudo-nopasswd
|
|
useradd --create-home -G sudo,video --shell /bin/bash rocm
|
|
EOF
|
|
USER rocm
|
|
WORKDIR /home/rocm
|
|
ENV PATH="${PATH}:/opt/rocm/bin"
|
|
|
|
# Default to login shell
|
|
CMD [ "bash", "-l" ]
|