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..38b76f0e56ca 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,11 @@ install_centos() { libsndfile-devel fi + # CentOS7 doesnt have support for higher version of libpng, # so it is built from source. # Libpng is required for torchvision build. build_libpng - # Cleanup yum clean all rm -rf /var/cache/yum