From 8df4f06337c8a06f819c022717bba6fb40a0ddd2 Mon Sep 17 00:00:00 2001 From: Junqiu Lei Date: Thu, 23 May 2024 14:17:16 -0700 Subject: [PATCH] Update al2 dockerfile for knn build (#4722) Signed-off-by: Junqiu Lei --- .../build.al2.opensearch.x64.arm64.dockerfile | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docker/ci/dockerfiles/current/build.al2.opensearch.x64.arm64.dockerfile b/docker/ci/dockerfiles/current/build.al2.opensearch.x64.arm64.dockerfile index df32196a1b..0a3080cdc8 100644 --- a/docker/ci/dockerfiles/current/build.al2.opensearch.x64.arm64.dockerfile +++ b/docker/ci/dockerfiles/current/build.al2.opensearch.x64.arm64.dockerfile @@ -90,12 +90,21 @@ RUN ln -sfn /usr/local/bin/python3.9 /usr/bin/python3 && \ pip3 install pip==23.1.2 && pip3 install pipenv==2023.6.12 awscli==1.32.17 # Add k-NN Library dependencies -RUN yum repolist && yum install openblas-static lapack gcc-gfortran -y +RUN yum repolist && yum install lapack gcc-gfortran -y && \ + git clone -b v0.3.3 --single-branch https://github.com/xianyi/OpenBLAS.git && \ + cd OpenBLAS && \ + make USE_OPENMP=1 FC=gfortran && \ + make PREFIX=/usr/local install +ENV LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" + RUN pip3 install cmake==3.23.3 # Upgrade gcc RUN yum install -y gcc10* && \ - ln -s `which gcc10-gcc` /usr/local/bin/gcc && \ - ln -s `which gcc10-g++` /usr/local/bin/g++ + mv -v /usr/bin/gcc /usr/bin/gcc7-gcc && \ + mv -v /usr/bin/g++ /usr/bin/gcc7-g++ && \ + update-alternatives --install /usr/bin/gcc gcc $(which gcc10-gcc) 1 && \ + update-alternatives --install /usr/bin/g++ g++ $(which gcc10-g++) 1 +ENV FC=gcc10-gfortran # Change User USER $CONTAINER_USER