Files
TheRock/rocm-systems/projects/rocprofiler-systems/docker/Dockerfile.rhel
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

98 lines
4.4 KiB
Docker

ARG DISTRO=rockylinux/rockylinux
ARG VERSION=8
FROM ${DISTRO}:${VERSION}
ENV HOME /root
ENV SHELL /bin/bash
ENV BASH_ENV /etc/bash.bashrc
ENV DEBIAN_FRONTEND noninteractive
WORKDIR /tmp
SHELL [ "/bin/bash", "-c" ]
ENV PATH /usr/lib64/openmpi/bin:/usr/local/bin:${PATH}
ENV LIBRARY_PATH ${LIBRARY_PATH}:/opt/amdgpu/lib64
# Dyninst needs GCC >= 10; RHEL 8 base is GCC 8 — use gcc-toolset on el8 only (install step below).
ARG GCC_TOOLSET_VERSION=10
RUN OS_VERSION_MAJOR=$(grep '^VERSION_ID=' /etc/os-release | cut -d'=' -f2 | tr -d '"' | cut -d'.' -f1) && \
yum install -y epel-release && crb enable && \
yum install -y --allowerasing \
autoconf automake chrpath cmake curl dpkg-devel elfutils-devel flex git glibc-devel \
gmock-devel gtest-devel iproute json-devel libdwarf-devel libdrm-devel libtool make \
ninja-build numactl-devel openmpi-devel papi-devel pkgconf pkgconf-m4 \
pkgconf-pkg-config python3-devel python3-pip redhat-rpm-config rpm-build rpm-sign \
sqlite-devel strace ucx-devel vim wget which zlib-devel && \
if [ "${OS_VERSION_MAJOR}" -eq 8 ]; then \
yum install -y gcc-toolset-${GCC_TOOLSET_VERSION}-binutils gcc-toolset-${GCC_TOOLSET_VERSION}-gcc gcc-toolset-${GCC_TOOLSET_VERSION}-gcc-c++ gcc-toolset-${GCC_TOOLSET_VERSION}-gcc-gfortran && \
_TS=/opt/rh/gcc-toolset-${GCC_TOOLSET_VERSION}/root/usr/bin && \
ln -sf "${_TS}/gcc" /usr/local/bin/gcc && \
ln -sf "${_TS}/g++" /usr/local/bin/g++ && \
ln -sf "${_TS}/gcc" /usr/local/bin/cc && \
ln -sf "${_TS}/g++" /usr/local/bin/c++ && \
ln -sf "${_TS}/gfortran" /usr/local/bin/gfortran; \
else \
yum install -y binutils gcc gcc-c++ gcc-gfortran; \
fi && \
yum clean all && \
python3 -m pip install --upgrade pip && \
python3 -m pip install 'cmake==3.25' && \
python3 -m pip install 'perfetto'
ARG ROCM_VERSION=0.0
ARG ROCM_MAJOR=0
ARG ROCM_MINOR=0
ARG ROCM_PATCH=0
ARG ROCM_VERSION_URL=0.0
ARG ROCM_VERSN=0
# Use only the major OS version in the ROCm repo URL (el8/el9/el10).
# The Rocky Linux base image uses a floating tag (e.g. :9) that resolves to
# the latest point release, and AMD does not publish repo packages for every
# minor version. The major-version path is stable across all point releases.
RUN if [ "${ROCM_MAJOR}" != "0" ] || [ "${ROCM_MINOR}" != "0" ]; then \
OS_VERSION_MAJOR=$(grep '^VERSION_ID=' /etc/os-release | cut -d'=' -f2 | tr -d '"' | cut -d. -f1) && \
printf '%s\n' '[rocm]' \
"name=ROCm ${ROCM_VERSION_URL} repository" \
"baseurl=https://repo.radeon.com/rocm/el${OS_VERSION_MAJOR}/${ROCM_VERSION_URL}/main" \
'enabled=1' 'priority=50' 'gpgcheck=1' \
'gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key' > /etc/yum.repos.d/rocm.repo && \
if [ "${OS_VERSION_MAJOR}" -eq 8 ]; then PERL_REPO=powertools; else PERL_REPO=crb; fi && \
dnf -y --enablerepo=${PERL_REPO} install perl-File-BaseDir && \
dnf install -y rocm-dev && \
dnf clean all; \
fi
ARG PYTHON_VERSIONS="8 9 10 11 12 13"
# Install pytest test dependencies into each conda env
COPY requirements.txt /tmp/requirements.txt
RUN wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -O miniforge.sh && \
bash miniforge.sh -b -p /opt/conda && \
export PATH="/opt/conda/bin:${PATH}" && \
conda config --set always_yes yes --set changeps1 no --set solver classic && \
conda update -c conda-forge -n base conda && \
for i in ${PYTHON_VERSIONS}; do \
conda create -n py3.${i} -c conda-forge python=3.${i} pip && \
/opt/conda/envs/py3.${i}/bin/python -m pip install -r /tmp/requirements.txt; \
done && \
conda clean -a -y && \
conda init
# Install pytest test dependencies for system python
RUN if python3 -c "import sys; sys.exit(0 if sys.version_info >= (3, 8) else 1)"; then \
python3 -m pip install -r /tmp/requirements.txt; \
else \
echo "Skipping system Python install: $(python3 --version 2>&1) is too old (rocprofiler-systems test suite requires >=3.8)"; \
fi && \
rm -f /tmp/requirements.txt
RUN if [ "${ROCM_VERSION}" != "0.0" ]; then ln -sf /opt/rocm-${ROCM_VERSION}* /opt/rocm; fi
WORKDIR /home
ENV LC_ALL C.UTF-8
SHELL [ "/bin/bash", "--login", "-c" ]
COPY ./docker/entrypoint-rhel.sh /docker-entrypoint.sh
ENTRYPOINT [ "/docker-entrypoint.sh" ]