From b390af4d5bd43ae3192710858655e101415faaa5 Mon Sep 17 00:00:00 2001 From: Jithun Nair <37884920+jithunnair-amd@users.noreply.github.com> Date: Tue, 29 Apr 2025 12:28:53 -0500 Subject: [PATCH 1/2] [release/2.7] Update CentOS dockerfile for CentOS Stream 9 (#2056) Validation: http://rocm-ci.amd.com/job/mainline-framework-pytorch-internal-ub22-py3.10-ci/212/ --------- Co-authored-by: ethanwee1 Co-authored-by: Jagadish Krishnamoorthy --- .ci/docker/centos-rocm/Dockerfile | 10 +++++++--- .ci/docker/common/install_base.sh | 8 +++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.ci/docker/centos-rocm/Dockerfile b/.ci/docker/centos-rocm/Dockerfile index 1303504ce090..573ceb012c98 100644 --- a/.ci/docker/centos-rocm/Dockerfile +++ b/.ci/docker/centos-rocm/Dockerfile @@ -19,8 +19,6 @@ RUN yum install -y glibc-langpack-en # Update CentOS git version RUN yum -y remove git RUN yum -y remove git-* -RUN yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo-1.9-1.x86_64.rpm && \ - sed -i 's/packages.endpoint/packages.endpointdev/' /etc/yum.repos.d/endpoint.repo RUN yum install -y git # Install devtoolset @@ -50,7 +48,13 @@ COPY ./common/install_conda.sh install_conda.sh COPY ./common/common_utils.sh common_utils.sh RUN bash ./install_conda.sh && rm install_conda.sh common_utils.sh /opt/conda/requirements-ci.txt -# (optional) Install vision packages like OpenCV +# (optional) Install protobuf for ONNX +ARG PROTOBUF +COPY ./common/install_protobuf.sh install_protobuf.sh +RUN if [ -n "${PROTOBUF}" ]; then bash ./install_protobuf.sh; fi +RUN rm install_protobuf.sh +ENV INSTALLED_PROTOBUF ${PROTOBUF} + ARG VISION COPY ./common/install_vision.sh ./common/cache_vision_models.sh ./common/common_utils.sh ./ RUN if [ -n "${VISION}" ]; then bash ./install_vision.sh; fi diff --git a/.ci/docker/common/install_base.sh b/.ci/docker/common/install_base.sh index cf13d5d958c2..c5071723a755 100755 --- a/.ci/docker/common/install_base.sh +++ b/.ci/docker/common/install_base.sh @@ -124,7 +124,10 @@ install_centos() { ccache_deps="asciidoc docbook-dtds docbook-style-xsl libxslt" numpy_deps="gcc-gfortran" - yum install -y \ + # Note: protobuf-c-{compiler,devel} on CentOS are too old to be used + # for Caffe2. That said, we still install them to make sure the build + # system opts to build/use protoc and libprotobuf from third-party. + yum install -y $ALLOW_ERASE \ $ccache_deps \ $numpy_deps \ autoconf \ @@ -158,11 +161,14 @@ install_centos() { libsndfile-devel fi +<<<<<<< HEAD # CentOS7 doesnt have support for higher version of libpng, # so it is built from source. # Libpng is required for torchvision build. build_libpng +======= +>>>>>>> 7fe67f61f48... [release/2.7] Update CentOS dockerfile for CentOS Stream 9 (#2056) # Cleanup yum clean all rm -rf /var/cache/yum From f7a672049e7316ba615c437348a99a23c140ac3e Mon Sep 17 00:00:00 2001 From: Ethan Wee Date: Mon, 25 Aug 2025 08:08:10 -0700 Subject: [PATCH 2/2] Update install_base.sh --- .ci/docker/common/install_base.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.ci/docker/common/install_base.sh b/.ci/docker/common/install_base.sh index c5071723a755..38b76f0e56ca 100755 --- a/.ci/docker/common/install_base.sh +++ b/.ci/docker/common/install_base.sh @@ -161,14 +161,11 @@ install_centos() { libsndfile-devel fi -<<<<<<< HEAD + # CentOS7 doesnt have support for higher version of libpng, # so it is built from source. # Libpng is required for torchvision build. build_libpng - -======= ->>>>>>> 7fe67f61f48... [release/2.7] Update CentOS dockerfile for CentOS Stream 9 (#2056) # Cleanup yum clean all rm -rf /var/cache/yum