diff --git a/docker/Dockerfile.ubuntu b/docker/Dockerfile.ubuntu index 2568c889..ab752813 100644 --- a/docker/Dockerfile.ubuntu +++ b/docker/Dockerfile.ubuntu @@ -19,6 +19,7 @@ ARG ROCM_REPO_VERSION="debian" ARG ROCM_VERSION="0.0" ARG ROCM_REPO_DIST="ubuntu" ARG PYTHON_VERSIONS="6 7 8 9 10 11 12" +ARG AMDGPU_DEB=6.0/ubuntu/focal/amdgpu-install_6.0.60000-1_all.deb ENV PATH ${HOME}/.local/bin:${PATH} RUN apt-get update && \ @@ -26,20 +27,13 @@ RUN apt-get update && \ apt-get install -y apt-utils autoconf autotools-dev bash-completion bison build-essential cmake curl git-core gnupg2 libnuma1 libopenmpi-dev libpapi-dev libpfm4-dev librpm-dev libtool libudev1 lsb-release m4 python3-pip rpm texinfo wget && \ python3 -m pip install 'cmake==3.21.4' +RUN echo "${AMDGPU_DEB}" + RUN if [ "${ROCM_VERSION}" != "0.0" ]; then \ - if [ -d /etc/apt/trusted.gpg.d ]; then \ - wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | gpg --dearmor > /etc/apt/trusted.gpg.d/rocm.gpg; \ - else \ - wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | apt-key add -; \ - fi && \ - echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${ROCM_REPO_VERSION}/ ${ROCM_REPO_DIST} main" | tee /etc/apt/sources.list.d/rocm.list && \ + wget https://repo.radeon.com/amdgpu-install/${ROCM_VERSION}/ubuntu/${ROCM_REPO_DIST}/${AMDGPU_DEB} && \ + apt-get install -y ./${AMDGPU_DEB} && \ apt-get update && \ - apt-get dist-upgrade -y && \ - apt-get install -y hsa-amd-aqlprofile hsa-rocr-dev hsakmt-roct-dev && \ - apt-get install -y hip-base hip-runtime-amd hip-dev && \ - apt-get install -y rocm-llvm rocm-core rocm-smi-lib rocm-device-libs && \ - apt-get install -y roctracer-dev rocprofiler-dev rccl-dev ${EXTRA_PACKAGES} && \ - if [ "$(echo ${ROCM_VERSION} | awk -F '.' '{print $1}')" -lt "5" ]; then apt-get install -y rocm-dev; fi && \ + apt install -y rocm-dev rocm-smi-lib roctracer-dev rocprofiler-dev rccl-dev libpciaccess0 ${EXTRA_PACKAGES} && \ apt-get autoclean; \ fi diff --git a/docker/build-docker.sh b/docker/build-docker.sh index c716c187..8f14298f 100755 --- a/docker/build-docker.sh +++ b/docker/build-docker.sh @@ -174,28 +174,23 @@ do ROCM_REPO_DIST="ubuntu" ROCM_REPO_VERSION=${ROCM_VERSION} case "${ROCM_VERSION}" in - 4.1* | 4.0*) - ROCM_REPO_DIST="xenial" - ;; 5.3 | 5.3.* | 5.4 | 5.4.* | 5.5 | 5.5.* | 5.6 | 5.6.* | 5.7 | 5.7.* | 6.*) case "${VERSION}" in 22.04) - ROCM_REPO_DIST="ubuntu" + ROCM_REPO_DIST="jammy" ;; 20.04) ROCM_REPO_DIST="focal" ;; - 18.04) - ROCM_REPO_DIST="bionic" - ;; *) ;; esac + ROCM_DEB=amdgpu-install_${ROCM_MAJOR}.${ROCM_MINOR}.${ROCM_VERSN}-1_all.deb ;; *) ;; esac - verbose-build docker build . ${PULL} --progress plain -f ${DOCKER_FILE} --tag ${CONTAINER} --build-arg DISTRO=${DISTRO} --build-arg VERSION=${VERSION} --build-arg ROCM_VERSION=${ROCM_VERSION} --build-arg ROCM_REPO_VERSION=${ROCM_REPO_VERSION} --build-arg ROCM_REPO_DIST=${ROCM_REPO_DIST} --build-arg PYTHON_VERSIONS=\"${PYTHON_VERSIONS}\" + verbose-build docker build . ${PULL} --progress plain -f ${DOCKER_FILE} --tag ${CONTAINER} --build-arg DISTRO=${DISTRO} --build-arg VERSION=${VERSION} --build-arg ROCM_VERSION=${ROCM_VERSION} --build-arg ROCM_REPO_VERSION=${ROCM_REPO_VERSION} --build-arg ROCM_REPO_DIST=${ROCM_REPO_DIST} --build-arg AMDGPU_DEB=${ROCM_DEB} --build-arg PYTHON_VERSIONS=\"${PYTHON_VERSIONS}\" elif [ "${DISTRO}" = "rhel" ]; then if [ -z "${VERSION_MINOR}" ]; then send-error "Please provide a major and minor version of the OS. Supported: >= 8.7, <= 9.3"