Update CI Docker files (#1202)

- Add `nlohmann-json-dev` (or equivalent) to CI Docker images for RHEL, SUSE, and Ubuntu.
- Add `gmock-dev` and `gtest-dev` (or equivalent) to CI Docker images for RHEL, SUSE, and Ubuntu.
- Add `--set solver classic` to conda config to resolve an issue setting up the conda environment
- Fix Perfetto package installation on ubuntu noble image.
- Add a check and log error if pip installation fail 

---------

Co-authored-by: jbonnell-amd <jason.bonnell@amd.com>
This commit is contained in:
David Galiffi
2025-10-02 21:06:01 -04:00
کامیت شده توسط GitHub
والد fb8ab442b6
کامیت c0f8627e7f
7فایلهای تغییر یافته به همراه41 افزوده شده و 24 حذف شده
@@ -24,8 +24,9 @@ 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 binutils-gold chrpath cmake curl dpkg-devel \
gcc-c++ git iproute2 libdrm-devel libnuma-devel ninja openmpi3-devel python3-pip rpm-build \
sqlite3-devel wget && \
gcc-c++ git gmock gtest iproute2 libdrm-devel libnuma-devel ninja \
nlohmann_json-devel openmpi3-devel python3-pip rpm-build \
sqlite3-devel wget && \
python3 -m pip install 'cmake==3.21'
ARG ROCM_VERSION=0.0
@@ -54,7 +55,7 @@ ARG PYTHON_VERSIONS="6 7 8 9 10 11 12 13"
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 && \
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; done && \
for i in ${PYTHON_VERSIONS}; do /opt/conda/envs/py3.${i}/bin/python -m pip install numpy perfetto dataclasses; done && \
@@ -28,8 +28,9 @@ 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 binutils-gold chrpath cmake curl dpkg-devel \
gcc-c++ git iproute2 libnuma-devel ninja openmpi3-devel papi-devel python3-devel \
python3-pip rpm-build sqlite3-devel vim wget && \
gcc-c++ git gmock gtest iproute2 libnuma-devel ninja nlohmann_json-devel \
openmpi3-devel papi-devel python3-devel python3-pip \
rpm-build sqlite3-devel vim wget && \
zypper --non-interactive clean --all && \
python3 -m pip install 'cmake==3.21' perfetto
@@ -38,7 +39,7 @@ ARG PYTHON_VERSIONS="6 7 8 9 10 11 12 13"
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 && \
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 numpy; done && \
for i in ${PYTHON_VERSIONS}; do /opt/conda/envs/py3.${i}/bin/python -m pip install numpy perfetto dataclasses; done && \
@@ -15,9 +15,9 @@ ENV LIBRARY_PATH ${LIBRARY_PATH}:/opt/amdgpu/lib64
RUN yum groupinstall -y "Development Tools" && \
yum install -y epel-release && crb enable && \
yum install -y --allowerasing chrpath cmake curl dpkg-devel iproute libdrm-devel \
ninja-build numactl-devel openmpi-devel papi-devel python3-pip sqlite-devel texinfo \
wget which zlib-devel && \
yum install -y --allowerasing chrpath cmake curl dpkg-devel gmock-devel gtest-devel \
iproute json-devel libdrm-devel ninja-build numactl-devel openmpi-devel \
papi-devel python3-pip sqlite-devel texinfo wget which zlib-devel && \
yum clean all && \
python3 -m pip install 'cmake==3.21' && \
python3 -m pip install 'perfetto'
@@ -48,7 +48,7 @@ ARG PYTHON_VERSIONS="6 7 8 9 10 11 12 13"
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 && \
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; done && \
for i in ${PYTHON_VERSIONS}; do /opt/conda/envs/py3.${i}/bin/python -m pip install numpy perfetto dataclasses; done && \
@@ -19,8 +19,9 @@ ARG NJOBS="8"
RUN yum groupinstall -y "Development Tools" && \
yum install -y epel-release && crb enable && \
yum install -y --allowerasing chrpath cmake curl dpkg-devel iproute ninja-build numactl-devel \
openmpi-devel papi-devel python3-devel python3-pip sqlite-devel texinfo wget which vim zlib-devel && \
yum install -y --allowerasing chrpath cmake curl dpkg-devel gmock-devel gtest-devel \
iproute json-devel ninja-build numactl-devel openmpi-devel papi-devel \
python3-devel python3-pip sqlite-devel texinfo wget which vim zlib-devel && \
yum clean all && \
python3 -m pip install 'cmake==3.21' perfetto
@@ -29,7 +30,7 @@ ARG PYTHON_VERSIONS="6 7 8 9 10 11 12 13"
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 && \
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 numpy; done && \
for i in ${PYTHON_VERSIONS}; do /opt/conda/envs/py3.${i}/bin/python -m pip install numpy perfetto dataclasses; done && \
@@ -22,8 +22,9 @@ RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y apt-utils autoconf autotools-dev bash-completion bison \
build-essential chrpath cmake curl flex gettext git-core gnupg2 iproute2 \
libnuma1 libopenmpi-dev libpapi-dev libpfm4-dev librpm-dev libsqlite3-dev \
libtool libudev1 lsb-release m4 ninja-build python3-pip rpm texinfo wget && \
libgmock-dev libgtest-dev libnuma1 libopenmpi-dev libpapi-dev libpfm4-dev \
librpm-dev libsqlite3-dev libtool libudev1 lsb-release m4 ninja-build \
nlohmann-json3-dev python3-pip rpm texinfo wget && \
OS_VERSION=$(grep '^VERSION_ID=' /etc/os-release | cut -d'=' -f2 | tr -d '"') && \
OS_ID=$(grep '^ID=' /etc/os-release | cut -d'=' -f2 | tr -d '"') && \
if [ "${OS_ID}" == "ubuntu" ] && [ "${OS_VERSION}" == "22.04" ]; then \
@@ -56,7 +57,7 @@ ARG PYTHON_VERSIONS="6 7 8 9 10 11 12 13"
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 && \
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; done && \
for i in ${PYTHON_VERSIONS}; do /opt/conda/envs/py3.${i}/bin/python -m pip install numpy perfetto dataclasses; done && \
@@ -25,16 +25,24 @@ RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y autoconf autotools-dev bash-completion bison build-essential \
bzip2 chrpath cmake curl environment-modules flex gettext git-core gnupg2 \
gzip iproute2 libiberty-dev libpapi-dev libpfm4-dev libsqlite3-dev libtool \
locales lsb-release m4 ninja-build python3-pip software-properties-common \
texinfo unzip wget vim zip zlib1g-dev && \
gzip iproute2 libgmock-dev libgtest-dev libiberty-dev libpapi-dev libpfm4-dev \
libsqlite3-dev libtool locales lsb-release m4 ninja-build nlohmann-json3-dev \
python3-pip software-properties-common texinfo unzip wget vim zip zlib1g-dev && \
apt-get autoclean
RUN if ! pip install 'cmake==3.21' perfetto 2>&1 | tee pip_output.log | grep -q "externally managed environment"; then \
echo "pip install succeeded without --break-system-packages"; \
RUN OS_VERSION=$(grep '^VERSION_ID=' /etc/os-release | cut -d'=' -f2 | tr -d '"') && \
OS_ID=$(grep '^ID=' /etc/os-release | cut -d'=' -f2 | tr -d '"') && \
if [ "${OS_ID}" == "ubuntu" ] && [ "${OS_VERSION}" == "22.04" ]; then \
python3 -m pip install 'cmake==3.21' perfetto; \
else \
echo "Retrying with --break-system-packages"; \
pip install --break-system-packages 'cmake==3.21' perfetto; \
python3 -m pip install --break-system-packages 'cmake==3.21' perfetto; \
fi
RUN if ! pip show perfetto 2>&1 | tee pip_output.log | grep -q "WARNING"; then \
echo "perfetto successfully installed!"; \
else \
echo "ERROR: perfetto install failed."; \
exit 1; \
fi
ARG PYTHON_VERSIONS="6 7 8 9 10 11 12 13"
@@ -42,7 +50,7 @@ ARG PYTHON_VERSIONS="6 7 8 9 10 11 12 13"
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 && \
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 numpy; done && \
for i in ${PYTHON_VERSIONS}; do /opt/conda/envs/py3.${i}/bin/python -m pip install numpy perfetto dataclasses; done && \
@@ -24,3 +24,8 @@ matrix:
version: "9.4"
- distro: "rhel"
version: "9.5"
- distro: "rhel"
version: "9.6"
# RHEL10
- distro: "rhel"
version: "10.0"