Upgrade gcc11 for centos7 (#22190)

Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>
This commit is contained in:
Enwei Jiao
2023-02-15 17:16:33 +08:00
committed by GitHub
parent 148a024e05
commit 5351fee733
7 changed files with 37 additions and 37 deletions
+10 -10
View File
@@ -9,33 +9,33 @@
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under the License.
FROM milvusdb/openblas:centos7-20230209
FROM milvusdb/openblas:centos7-20230215
RUN yum install -y epel-release centos-release-scl-rh && yum install -y wget curl which && \
wget -qO- "https://cmake.org/files/v3.24/cmake-3.24.0-linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local && \
yum install -y git make automake python3-devel \
devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-gcc-gfortran \
llvm-toolset-8.0-clang llvm-toolset-8.0-clang-tools-extra \
devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-gcc-gfortran \
llvm-toolset-11.0-clang llvm-toolset-11.0-clang-tools-extra \
libaio libuuid-devel unzip \
ccache lcov libtool m4 autoconf automake && \
rm -rf /var/cache/yum/* && \
echo "source scl_source enable devtoolset-8" >> /etc/profile.d/devtoolset-8.sh && \
echo "source scl_source enable llvm-toolset-8.0" >> /etc/profile.d/llvm-toolset-8.sh
echo "source scl_source enable devtoolset-11" >> /etc/profile.d/devtoolset-11.sh && \
echo "source scl_source enable llvm-toolset-11.0" >> /etc/profile.d/llvm-toolset-11.sh
RUN pip3 install conan==1.58.0
RUN mkdir /tmp/stdlib && cd /tmp/stdlib && \
wget https://repo.anaconda.com/archive/Anaconda3-2019.07-Linux-x86_64.sh && \
sh Anaconda3-2019.07-Linux-x86_64.sh -b -p conda && \
cp conda/lib/libstdc++.so.6.0.26 /usr/lib64 && \
wget https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh && \
sh Anaconda3-2022.10-Linux-x86_64.sh -b -p conda && \
cp conda/lib/libstdc++.so.6.0.29 /usr/lib64 && \
rm /usr/lib64/libstdc++.so.6 && \
ln -s /usr/lib64/libstdc++.so.6.0.26 /usr/lib64/libstdc++.so.6 && \
ln -s /usr/lib64/libstdc++.so.6.0.29 /usr/lib64/libstdc++.so.6 && \
cp conda/lib/libatomic.so.1.2.0 /usr/lib64 && \
ln -s /usr/lib64/libatomic.so.1.2.0 /usr/lib64/libatomic.so && \
ln -s /usr/lib64/libatomic.so.1.2.0 /usr/lib64/libatomic.so.1 && \
rm -rf /tmp/stdlib
ENV CLANG_TOOLS_PATH="/opt/rh/llvm-toolset-8.0/root/usr/bin"
ENV CLANG_TOOLS_PATH="/opt/rh/llvm-toolset-11.0/root/usr/bin"
ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH
# Install Go
+4 -4
View File
@@ -22,12 +22,12 @@ if ! whoami &> /dev/null; then
fi
set +e
if [ -f "/etc/profile.d/devtoolset-8.sh" ]; then
source "/etc/profile.d/devtoolset-8.sh"
if [ -f "/etc/profile.d/devtoolset-11.sh" ]; then
source "/etc/profile.d/devtoolset-11.sh"
fi
if [ -f "/etc/profile.d/llvm-toolset-8.sh" ]; then
source "/etc/profile.d/llvm-toolset-8.sh"
if [ -f "/etc/profile.d/llvm-toolset-11.sh" ]; then
source "/etc/profile.d/llvm-toolset-11.sh"
fi
# Exit immediately for non zero status
+1 -1
View File
@@ -9,7 +9,7 @@
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under the License.
FROM milvusdb/openblas:centos7-20230209 AS openblas
FROM milvusdb/openblas:centos7-20230215 AS openblas
FROM centos:centos7
+3 -3
View File
@@ -3,11 +3,11 @@ FROM centos:centos7
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN yum install -y epel-release centos-release-scl-rh && yum install -y wget make automake \
devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-gcc-gfortran && \
devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-gcc-gfortran && \
rm -rf /var/cache/yum/* && \
echo "source scl_source enable devtoolset-8" >> /etc/profile.d/devtoolset-8.sh
echo "source scl_source enable devtoolset-11" >> /etc/profile.d/devtoolset-11.sh
RUN source /etc/profile.d/devtoolset-8.sh && \
RUN source /etc/profile.d/devtoolset-11.sh && \
wget https://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz && \
tar zxvf v0.3.9.tar.gz && cd OpenBLAS-0.3.9 && \
make TARGET=CORE2 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1 USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="-O3 -g -fPIC" FCOMMON_OPT="-O3 -g -fPIC -frecursive" NMAX="NUM_THREADS=128" LIBPREFIX="libopenblas" INTERFACE64=0 NO_STATIC=1 && \
+5 -5
View File
@@ -4,12 +4,12 @@
# Install devltoolset
yum install -y epel-release centos-release-scl-rh && yum install -y wget make automake \
devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-gcc-gfortran && \
devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-gcc-gfortran && \
rm -rf /var/cache/yum/* && \
echo "source scl_source enable devtoolset-8" >> /etc/profile.d/devtoolset-8.sh
echo "source scl_source enable devtoolset-11" >> /etc/profile.d/devtoolset-11.sh
# Install openblas
source /etc/profile.d/devtoolset-8.sh && \
source /etc/profile.d/devtoolset-11.sh && \
wget https://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz && \
tar zxvf v0.3.9.tar.gz && cd OpenBLAS-0.3.9 && \
make TARGET=CORE2 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1 USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="-O3 -g -fPIC" FCOMMON_OPT="-O3 -g -fPIC -frecursive" NMAX="NUM_THREADS=128" LIBPREFIX="libopenblas" INTERFACE64=0 NO_STATIC=1 && \
@@ -19,14 +19,14 @@ source /etc/profile.d/devtoolset-8.sh && \
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib"
# Install tbb
source /etc/profile.d/devtoolset-8.sh && \
source /etc/profile.d/devtoolset-11.sh && \
git clone https://github.com/wjakob/tbb.git && \
cd tbb/build && \
cmake .. && make -j && make install && \
cd ../../ && rm -rf tbb/
# Install boost
source /etc/profile.d/devtoolset-8.sh && \
source /etc/profile.d/devtoolset-11.sh && \
wget -q https://boostorg.jfrog.io/artifactory/main/release/1.65.1/source/boost_1_65_1.tar.gz && \
tar zxf boost_1_65_1.tar.gz && cd boost_1_65_1 && \
./bootstrap.sh --prefix=/usr/local --with-toolset=gcc --without-libraries=python && \
+7 -7
View File
@@ -26,20 +26,20 @@ function install_linux_deps() {
sudo pip3 install conan
elif [[ -x "$(command -v yum)" ]]; then
# for CentOS devtoolset-8
# for CentOS devtoolset-11
sudo yum install -y epel-release centos-release-scl-rh
sudo yum install -y wget curl which \
git make automake python3-devel \
devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-gcc-gfortran \
llvm-toolset-8.0-clang llvm-toolset-8.0-clang-tools-extra \
devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-gcc-gfortran \
llvm-toolset-11.0-clang llvm-toolset-11.0-clang-tools-extra \
libaio libuuid-devel unzip \
ccache lcov libtool m4 autoconf automake
sudo pip3 install conan
echo "source scl_source enable devtoolset-8" | sudo tee -a /etc/profile.d/devtoolset-8.sh
echo "source scl_source enable llvm-toolset-8.0" | sudo tee -a /etc/profile.d/llvm-toolset-8.sh
echo "export CLANG_TOOLS_PATH=/opt/rh/llvm-toolset-8.0/root/usr/bin" | sudo tee -a /etc/profile.d/llvm-toolset-8.sh
source "/etc/profile.d/llvm-toolset-8.sh"
echo "source scl_source enable devtoolset-11" | sudo tee -a /etc/profile.d/devtoolset-11.sh
echo "source scl_source enable llvm-toolset-11.0" | sudo tee -a /etc/profile.d/llvm-toolset-11.sh
echo "export CLANG_TOOLS_PATH=/opt/rh/llvm-toolset-11.0/root/usr/bin" | sudo tee -a /etc/profile.d/llvm-toolset-11.sh
source "/etc/profile.d/llvm-toolset-11.sh"
else
echo "Error Install Dependencies ..."
exit 1
+7 -7
View File
@@ -33,16 +33,16 @@ function install_linux_deps() {
sudo yum install -y epel-release centos-release-scl-rh && \
sudo yum install -y git make automake ccache openssl-devel zlib-devel libzstd-devel \
libcurl-devel python3-devel \
devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-gcc-gfortran \
llvm-toolset-8.0-clang llvm-toolset-8.0-clang-tools-extra
devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-gcc-gfortran \
llvm-toolset-11.0-clang llvm-toolset-11.0-clang-tools-extra
echo "source scl_source enable devtoolset-8" | sudo tee -a /etc/profile.d/devtoolset-8.sh
echo "source scl_source enable llvm-toolset-8.0" | sudo tee -a /etc/profile.d/llvm-toolset-8.sh
echo "export CLANG_TOOLS_PATH=/opt/rh/llvm-toolset-8.0/root/usr/bin" | sudo tee -a /etc/profile.d/llvm-toolset-8.sh
source "/etc/profile.d/llvm-toolset-8.sh"
echo "source scl_source enable devtoolset-11" | sudo tee -a /etc/profile.d/devtoolset-11.sh
echo "source scl_source enable llvm-toolset-11.0" | sudo tee -a /etc/profile.d/llvm-toolset-11.sh
echo "export CLANG_TOOLS_PATH=/opt/rh/llvm-toolset-11.0/root/usr/bin" | sudo tee -a /etc/profile.d/llvm-toolset-11.sh
source "/etc/profile.d/llvm-toolset-11.sh"
# install OpenBLAS, this could take a while.
source "/etc/profile.d/devtoolset-8.sh" && \
source "/etc/profile.d/devtoolset-11.sh" && \
wget https://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz && \
tar zxvf v0.3.9.tar.gz && cd OpenBLAS-0.3.9 && \
make TARGET=CORE2 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1 USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="-O3 -g -fPIC" FCOMMON_OPT="-O3 -g -fPIC -frecursive" NMAX="NUM_THREADS=128" LIBPREFIX="libopenblas" INTERFACE64=0 NO_STATIC=1 && \