Skip to content

Commit

Permalink
ROCm 6.0 packaging (#325)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jrmadsen authored Jan 10, 2024
1 parent adefde7 commit cfaace3
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 18 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/cpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/opensuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/ubuntu-bionic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/ubuntu-focal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/ubuntu-jammy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
16 changes: 8 additions & 8 deletions docker/Dockerfile.opensuse
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ 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
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"
Expand Down
10 changes: 5 additions & 5 deletions docker/Dockerfile.opensuse.ci
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 10 additions & 5 deletions docker/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand All @@ -208,7 +208,7 @@ do

# set the sub-URL in https://repo.radeon.com/amdgpu-install/<sub-URL>
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.*)
Expand Down Expand Up @@ -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.*)
Expand All @@ -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
Expand Down

0 comments on commit cfaace3

Please sign in to comment.