From 1444bf4d85ff450ceea7b164e9ddc72391d47a2d Mon Sep 17 00:00:00 2001 From: "Jonathan R. Madsen" Date: Wed, 10 Jan 2024 17:29:47 -0600 Subject: [PATCH] ROCm 6.0 packaging (#325) * Update build-docker.sh - support rocm 6.0 * Update cpack workflow - support rocm 6.0 * Update CI testing workflow paths-ignore - changes to {docs,cpack,containers,formatting}.yml and docker do not require testing * Update docker for OpenSUSE - always use --non-interactive with zypper - tweak to PERL_REPO when OS version >= 15.4 [ROCm/rocprofiler-systems commit: cfaace38a871a9ac1c23c26eff3dcecb1da8252b] --- .../.github/workflows/cpack.yml | 30 +++++++++++++++++++ .../.github/workflows/opensuse.yml | 10 +++++++ .../.github/workflows/redhat.yml | 10 +++++++ .../.github/workflows/ubuntu-bionic.yml | 10 +++++++ .../.github/workflows/ubuntu-focal.yml | 10 +++++++ .../.github/workflows/ubuntu-jammy.yml | 10 +++++++ .../docker/Dockerfile.opensuse | 16 +++++----- .../docker/Dockerfile.opensuse.ci | 10 +++---- .../docker/build-docker.sh | 15 ++++++---- 9 files changed, 103 insertions(+), 18 deletions(-) diff --git a/projects/rocprofiler-systems/.github/workflows/cpack.yml b/projects/rocprofiler-systems/.github/workflows/cpack.yml index 2b291cd319..6de68f43be 100644 --- a/projects/rocprofiler-systems/.github/workflows/cpack.yml +++ b/projects/rocprofiler-systems/.github/workflows/cpack.yml @@ -51,6 +51,9 @@ jobs: - os-distro: "ubuntu" os-version: "20.04" rocm-version: "5.7" + - os-distro: "ubuntu" + os-version: "20.04" + rocm-version: "6.0" # ubuntu 22.04 - os-distro: "ubuntu" os-version: "22.04" @@ -67,6 +70,9 @@ jobs: - os-distro: "ubuntu" os-version: "22.04" rocm-version: "5.7" + - os-distro: "ubuntu" + os-version: "22.04" + rocm-version: "6.0" # opensuse 15.3 - os-distro: "opensuse" os-version: "15.3" @@ -105,6 +111,16 @@ jobs: - os-distro: "opensuse" os-version: "15.4" rocm-version: "5.7" + - os-distro: "opensuse" + os-version: "15.4" + rocm-version: "6.0" + # opensuse 15.5 + - os-distro: "opensuse" + os-version: "15.5" + rocm-version: "0.0" + - os-distro: "opensuse" + os-version: "15.5" + rocm-version: "6.0" # RHEL 8.7 - os-distro: "rhel" os-version: "8.7" @@ -140,6 +156,20 @@ jobs: - os-distro: "rhel" os-version: "9.1" rocm-version: "5.7" + # RHEL 9.2 + - os-distro: "rhel" + os-version: "9.2" + rocm-version: "0.0" + - os-distro: "rhel" + os-version: "9.2" + rocm-version: "6.0" + # RHEL 9.3 + - os-distro: "rhel" + os-version: "9.3" + rocm-version: "0.0" + - os-distro: "rhel" + os-version: "9.3" + rocm-version: "6.0" steps: - name: Free Disk Space diff --git a/projects/rocprofiler-systems/.github/workflows/opensuse.yml b/projects/rocprofiler-systems/.github/workflows/opensuse.yml index 170874ab08..a3c37d8cd8 100644 --- a/projects/rocprofiler-systems/.github/workflows/opensuse.yml +++ b/projects/rocprofiler-systems/.github/workflows/opensuse.yml @@ -8,12 +8,22 @@ on: - '*.md' - 'source/docs/**' - 'source/python/gui/**' + - '.github/workflows/docs.yml' + - '.github/workflows/cpack.yml' + - '.github/workflows/containers.yml' + - '.github/workflows/formatting.yml' + - 'docker/**' pull_request: branches: [ main, develop ] paths-ignore: - '*.md' - 'source/docs/**' - 'source/python/gui/**' + - '.github/workflows/docs.yml' + - '.github/workflows/cpack.yml' + - '.github/workflows/containers.yml' + - '.github/workflows/formatting.yml' + - 'docker/**' concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/projects/rocprofiler-systems/.github/workflows/redhat.yml b/projects/rocprofiler-systems/.github/workflows/redhat.yml index d283e80442..500ca6c6d6 100644 --- a/projects/rocprofiler-systems/.github/workflows/redhat.yml +++ b/projects/rocprofiler-systems/.github/workflows/redhat.yml @@ -8,12 +8,22 @@ on: - '*.md' - 'source/docs/**' - 'source/python/gui/**' + - '.github/workflows/docs.yml' + - '.github/workflows/cpack.yml' + - '.github/workflows/containers.yml' + - '.github/workflows/formatting.yml' + - 'docker/**' pull_request: branches: [ main, develop ] paths-ignore: - '*.md' - 'source/docs/**' - 'source/python/gui/**' + - '.github/workflows/docs.yml' + - '.github/workflows/cpack.yml' + - '.github/workflows/containers.yml' + - '.github/workflows/formatting.yml' + - 'docker/**' concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/projects/rocprofiler-systems/.github/workflows/ubuntu-bionic.yml b/projects/rocprofiler-systems/.github/workflows/ubuntu-bionic.yml index 7dd0f655d5..0630cd384a 100644 --- a/projects/rocprofiler-systems/.github/workflows/ubuntu-bionic.yml +++ b/projects/rocprofiler-systems/.github/workflows/ubuntu-bionic.yml @@ -8,12 +8,22 @@ on: - '*.md' - 'source/docs/**' - 'source/python/gui/**' + - '.github/workflows/docs.yml' + - '.github/workflows/cpack.yml' + - '.github/workflows/containers.yml' + - '.github/workflows/formatting.yml' + - 'docker/**' pull_request: branches: [ main, develop ] paths-ignore: - '*.md' - 'source/docs/**' - 'source/python/gui/**' + - '.github/workflows/docs.yml' + - '.github/workflows/cpack.yml' + - '.github/workflows/containers.yml' + - '.github/workflows/formatting.yml' + - 'docker/**' concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/projects/rocprofiler-systems/.github/workflows/ubuntu-focal.yml b/projects/rocprofiler-systems/.github/workflows/ubuntu-focal.yml index 914a500df2..cc765ef4c8 100644 --- a/projects/rocprofiler-systems/.github/workflows/ubuntu-focal.yml +++ b/projects/rocprofiler-systems/.github/workflows/ubuntu-focal.yml @@ -8,12 +8,22 @@ on: - '*.md' - 'source/docs/**' - 'source/python/gui/**' + - '.github/workflows/docs.yml' + - '.github/workflows/cpack.yml' + - '.github/workflows/containers.yml' + - '.github/workflows/formatting.yml' + - 'docker/**' pull_request: branches: [ main, develop ] paths-ignore: - '*.md' - 'source/docs/**' - 'source/python/gui/**' + - '.github/workflows/docs.yml' + - '.github/workflows/cpack.yml' + - '.github/workflows/containers.yml' + - '.github/workflows/formatting.yml' + - 'docker/**' concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/projects/rocprofiler-systems/.github/workflows/ubuntu-jammy.yml b/projects/rocprofiler-systems/.github/workflows/ubuntu-jammy.yml index 829162c273..1c6bb60c0a 100644 --- a/projects/rocprofiler-systems/.github/workflows/ubuntu-jammy.yml +++ b/projects/rocprofiler-systems/.github/workflows/ubuntu-jammy.yml @@ -8,12 +8,22 @@ on: - '*.md' - 'source/docs/**' - 'source/python/gui/**' + - '.github/workflows/docs.yml' + - '.github/workflows/cpack.yml' + - '.github/workflows/containers.yml' + - '.github/workflows/formatting.yml' + - 'docker/**' pull_request: branches: [ main, develop ] paths-ignore: - '*.md' - 'source/docs/**' - 'source/python/gui/**' + - '.github/workflows/docs.yml' + - '.github/workflows/cpack.yml' + - '.github/workflows/containers.yml' + - '.github/workflows/formatting.yml' + - 'docker/**' concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/projects/rocprofiler-systems/docker/Dockerfile.opensuse b/projects/rocprofiler-systems/docker/Dockerfile.opensuse index e3cdf92a3c..f8b3543934 100644 --- a/projects/rocprofiler-systems/docker/Dockerfile.opensuse +++ b/projects/rocprofiler-systems/docker/Dockerfile.opensuse @@ -13,10 +13,10 @@ SHELL [ "/bin/bash", "-c" ] ENV PATH /usr/local/bin:${PATH} ENV LIBRARY_PATH ${LIBRARY_PATH}:/opt/amdgpu/lib64 -RUN zypper update -y && \ - zypper dist-upgrade -y && \ - zypper install -y -t pattern devel_basis && \ - zypper install -y python3-pip openmpi3-devel gcc-c++ git libnuma-devel dpkg-devel rpm-build wget curl binutils-gold && \ +RUN zypper --non-interactive update -y && \ + zypper --non-interactive dist-upgrade -y && \ + zypper --non-interactive install -y -t pattern devel_basis && \ + zypper --non-interactive install -y python3-pip openmpi3-devel gcc-c++ git libnuma-devel dpkg-devel rpm-build wget curl binutils-gold && \ python3 -m pip install 'cmake==3.21.4' ARG ROCM_VERSION=0.0 @@ -24,11 +24,11 @@ ARG AMDGPU_RPM=latest/sle/15/amdgpu-install-21.50.50000-1.noarch.rpm ARG PERL_REPO=SLE_15 RUN if [ "${ROCM_VERSION}" != "0.0" ]; then \ - zypper addrepo https://mirrorcache-us.opensuse.org/repositories/devel:/languages:/perl/${PERL_REPO}/devel:languages:perl.repo && \ - zypper --no-gpg-checks install -y https://repo.radeon.com/amdgpu-install/${AMDGPU_RPM} && \ + zypper --non-interactive addrepo https://mirrorcache-us.opensuse.org/repositories/devel:/languages:/perl/${PERL_REPO}/devel:languages:perl.repo && \ + zypper --non-interactive --no-gpg-checks install -y https://repo.radeon.com/amdgpu-install/${AMDGPU_RPM} && \ zypper --non-interactive --gpg-auto-import-keys refresh && \ - zypper install -y rocm-dev rocm-smi-lib roctracer-dev rocprofiler-dev rccl-devel libpciaccess0 && \ - zypper clean --all; \ + zypper --non-interactive install -y rocm-dev rocm-smi-lib roctracer-dev rocprofiler-dev rccl-devel libpciaccess0 && \ + zypper --non-interactive clean --all; \ fi ARG PYTHON_VERSIONS="6 7 8 9 10 11 12" diff --git a/projects/rocprofiler-systems/docker/Dockerfile.opensuse.ci b/projects/rocprofiler-systems/docker/Dockerfile.opensuse.ci index 888e888498..92c7fabe20 100644 --- a/projects/rocprofiler-systems/docker/Dockerfile.opensuse.ci +++ b/projects/rocprofiler-systems/docker/Dockerfile.opensuse.ci @@ -16,12 +16,12 @@ ARG EXTRA_PACKAGES="" ARG ELFUTILS_DOWNLOAD_VERSION="0.186" ARG NJOBS="12" -RUN zypper update -y && \ - zypper dist-upgrade -y && \ - zypper install -y -t pattern devel_basis && \ - zypper install -y python3-pip openmpi3-devel gcc-c++ git libnuma-devel dpkg-devel rpm-build papi-devel curl wget binutils-gold && \ +RUN zypper --non-interactive update -y && \ + zypper --non-interactive dist-upgrade -y && \ + zypper --non-interactive install -y -t pattern devel_basis && \ + zypper --non-interactive install -y python3-pip openmpi3-devel gcc-c++ git libnuma-devel dpkg-devel rpm-build papi-devel curl wget binutils-gold && \ python3 -m pip install 'cmake==3.18.4' && \ - zypper clean --all + zypper --non-interactive clean --all COPY ./dyninst-source /tmp/dyninst diff --git a/projects/rocprofiler-systems/docker/build-docker.sh b/projects/rocprofiler-systems/docker/build-docker.sh index 715114ee81..faa2cb8d0c 100755 --- a/projects/rocprofiler-systems/docker/build-docker.sh +++ b/projects/rocprofiler-systems/docker/build-docker.sh @@ -177,10 +177,10 @@ do 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.*) + 5.3 | 5.3.* | 5.4 | 5.4.* | 5.5 | 5.5.* | 5.6 | 5.6.* | 5.7 | 5.7.* | 6.0 | 6.0.*) case "${VERSION}" in 22.04) - ROCM_REPO_DIST="jammy" + ROCM_REPO_DIST="ubuntu" ;; 20.04) ROCM_REPO_DIST="focal" @@ -198,7 +198,7 @@ do 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}\" 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.1" + send-error "Please provide a major and minor version of the OS. Supported: >= 8.7, <= 9.3" fi # Components used to create the sub-URL below @@ -208,7 +208,7 @@ do # set the sub-URL in https://repo.radeon.com/amdgpu-install/ case "${ROCM_VERSION}" in - 5.3 | 5.3.* | 5.4 | 5.4.* | 5.5 | 5.5.* | 5.6 | 5.6.* | 5.7 | 5.7.*) + 5.3 | 5.3.* | 5.4 | 5.4.* | 5.5 | 5.5.* | 5.6 | 5.6.* | 5.7 | 5.7.* | 6.0 | 6.0.*) ROCM_RPM=${ROCM_VERSION}/rhel/${RPM_PATH}/amdgpu-install-${ROCM_MAJOR}.${ROCM_MINOR}.${ROCM_VERSN}-1${RPM_TAG}.noarch.rpm ;; 5.2 | 5.2.* | 5.1 | 5.1.* | 5.0 | 5.0.* | 4.*) @@ -236,7 +236,7 @@ do ;; esac case "${ROCM_VERSION}" in - 5.3 | 5.3.* | 5.4 | 5.4.* | 5.5 | 5.5.* | 5.6 | 5.6.* | 5.7 | 5.7.*) + 5.3 | 5.3.* | 5.4 | 5.4.* | 5.5 | 5.5.* | 5.6 | 5.6.* | 5.7 | 5.7.* | 6.0 | 6.0.*) ROCM_RPM=${ROCM_VERSION}/sle/${VERSION}/amdgpu-install-${ROCM_MAJOR}.${ROCM_MINOR}.${ROCM_VERSN}-1.noarch.rpm ;; 5.2 | 5.2.*) @@ -258,6 +258,11 @@ do ;; esac PERL_REPO="SLE_${VERSION_MAJOR}_SP${VERSION_MINOR}" + if [ "${VERSION_MAJOR}" -ge 15 ]; then + if [ "${VERSION_MINOR}" -ge 4 ]; then + PERL_REPO="${VERSION_MAJOR}.${VERSION_MINOR}" + fi + fi verbose-build docker build . ${PULL} --progress plain -f ${DOCKER_FILE} --tag ${CONTAINER} --build-arg DISTRO=${DISTRO_IMAGE} --build-arg VERSION=${VERSION} --build-arg ROCM_VERSION=${ROCM_VERSION} --build-arg AMDGPU_RPM=${ROCM_RPM} --build-arg PERL_REPO=${PERL_REPO} --build-arg PYTHON_VERSIONS=\"${PYTHON_VERSIONS}\" fi if [ "${PUSH}" -ne 0 ]; then