Skip to content

Commit

Permalink
Update APT-Get packages
Browse files Browse the repository at this point in the history
hipcc is no longer included in hip-runtime-amd meta packages.
This change standardizes the installs with the other OSes.

Signed-off-by: David Galiffi <[email protected]>
  • Loading branch information
dgaliffiAMD committed Aug 7, 2024
1 parent b063be9 commit fa0f2c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
16 changes: 4 additions & 12 deletions docker/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -27,19 +28,10 @@ RUN apt-get update && \
python3 -m pip install 'cmake==3.21.4'

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-get install -y rocm-dev rocm-smi-lib roctracer-dev rocprofiler-dev rccl-dev libpciaccess0 ${EXTRA_PACKAGES} && \
apt-get autoclean; \
fi

Expand Down
11 changes: 3 additions & 8 deletions docker/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit fa0f2c0

Please sign in to comment.