From 8cc6e623ee0d7f9a2b072e54285a2ce8c686d295 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Thu, 13 Jul 2023 13:19:35 -0400 Subject: [PATCH] Upgrade gcc to 8 with devtoolset-8 for k-NN faiss lib compilation (#3732) Signed-off-by: Peter Zhu --- .../build.centos7.opensearch.x64.arm64.dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docker/ci/dockerfiles/current/build.centos7.opensearch.x64.arm64.dockerfile b/docker/ci/dockerfiles/current/build.centos7.opensearch.x64.arm64.dockerfile index 0865dad289..7371a0f39e 100644 --- a/docker/ci/dockerfiles/current/build.centos7.opensearch.x64.arm64.dockerfile +++ b/docker/ci/dockerfiles/current/build.centos7.opensearch.x64.arm64.dockerfile @@ -89,6 +89,15 @@ RUN ln -sfn /usr/local/bin/python3.9 /usr/bin/python3 && \ # Add k-NN Library dependencies RUN yum install epel-release -y && yum repolist && yum install openblas-static lapack gcc-gfortran -y RUN pip3 install cmake==3.23.3 +# Upgrade gcc8 +# The setup part is partially based on Austin Dewey's article: +# https://austindewey.com/2019/03/26/enabling-software-collections-binaries-on-a-docker-image/ +RUN yum install -y centos-release-scl && yum install -y devtoolset-8 && yum clean all && \ + echo "source scl_source enable devtoolset-8" > /etc/profile.d/scl_devtoolset8.sh +COPY --chown=0:0 config/scl_setup /usr/local/bin/scl_setup +ENV BASH_ENV="/usr/local/bin/scl_setup" +ENV ENV="/usr/local/bin/scl_setup" +ENV PROMPT_COMMAND=". /usr/local/bin/scl_setup" # Change User USER 1000