Upgrade gcc in CentOS (#22086)

Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>
This commit is contained in:
Enwei Jiao 2023-02-09 17:32:31 +08:00 committed by GitHub
parent d085abbd56
commit e1ec24895d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 28 additions and 28 deletions

View File

@ -9,7 +9,7 @@
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express # 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. # or implied. See the License for the specific language governing permissions and limitations under the License.
FROM milvusdb/openblas:centos7-20210706 FROM milvusdb/openblas:centos7-20230209
RUN yum install -y epel-release centos-release-scl-rh && yum install -y wget curl which && \ 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 && \ 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 && \

View File

@ -22,12 +22,12 @@ if ! whoami &> /dev/null; then
fi fi
set +e set +e
if [ -f "/etc/profile.d/devtoolset-7.sh" ]; then if [ -f "/etc/profile.d/devtoolset-8.sh" ]; then
source "/etc/profile.d/devtoolset-7.sh" source "/etc/profile.d/devtoolset-8.sh"
fi fi
if [ -f "/etc/profile.d/llvm-toolset-7.sh" ]; then if [ -f "/etc/profile.d/llvm-toolset-8.sh" ]; then
source "/etc/profile.d/llvm-toolset-7.sh" source "/etc/profile.d/llvm-toolset-8.sh"
fi fi
# Exit immediately for non zero status # Exit immediately for non zero status

View File

@ -9,7 +9,7 @@
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express # 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. # or implied. See the License for the specific language governing permissions and limitations under the License.
FROM milvusdb/openblas:centos7-20210706 AS openblas FROM milvusdb/openblas:centos7-20230209 AS openblas
FROM centos:centos7 FROM centos:centos7

View File

@ -3,11 +3,11 @@ FROM centos:centos7
SHELL ["/bin/bash", "-o", "pipefail", "-c"] SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN yum install -y epel-release centos-release-scl-rh && yum install -y wget make automake \ RUN yum install -y epel-release centos-release-scl-rh && yum install -y wget make automake \
devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran && \ devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-gcc-gfortran && \
rm -rf /var/cache/yum/* && \ rm -rf /var/cache/yum/* && \
echo "source scl_source enable devtoolset-7" >> /etc/profile.d/devtoolset-7.sh echo "source scl_source enable devtoolset-8" >> /etc/profile.d/devtoolset-8.sh
RUN source /etc/profile.d/devtoolset-7.sh && \ RUN source /etc/profile.d/devtoolset-8.sh && \
wget https://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz && \ wget https://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz && \
tar zxvf v0.3.9.tar.gz && cd OpenBLAS-0.3.9 && \ 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 && \ 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 && \

View File

@ -4,12 +4,12 @@
# Install devltoolset # Install devltoolset
yum install -y epel-release centos-release-scl-rh && yum install -y wget make automake \ yum install -y epel-release centos-release-scl-rh && yum install -y wget make automake \
devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran && \ devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-gcc-gfortran && \
rm -rf /var/cache/yum/* && \ rm -rf /var/cache/yum/* && \
echo "source scl_source enable devtoolset-7" >> /etc/profile.d/devtoolset-7.sh echo "source scl_source enable devtoolset-8" >> /etc/profile.d/devtoolset-8.sh
# Install openblas # Install openblas
source /etc/profile.d/devtoolset-7.sh && \ source /etc/profile.d/devtoolset-8.sh && \
wget https://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz && \ wget https://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz && \
tar zxvf v0.3.9.tar.gz && cd OpenBLAS-0.3.9 && \ 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 && \ 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-7.sh && \
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib"
# Install tbb # Install tbb
source /etc/profile.d/devtoolset-7.sh && \ source /etc/profile.d/devtoolset-8.sh && \
git clone https://github.com/wjakob/tbb.git && \ git clone https://github.com/wjakob/tbb.git && \
cd tbb/build && \ cd tbb/build && \
cmake .. && make -j && make install && \ cmake .. && make -j && make install && \
cd ../../ && rm -rf tbb/ cd ../../ && rm -rf tbb/
# Install boost # Install boost
source /etc/profile.d/devtoolset-7.sh && \ source /etc/profile.d/devtoolset-8.sh && \
wget -q https://boostorg.jfrog.io/artifactory/main/release/1.65.1/source/boost_1_65_1.tar.gz && \ 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 && \ tar zxf boost_1_65_1.tar.gz && cd boost_1_65_1 && \
./bootstrap.sh --prefix=/usr/local --with-toolset=gcc --without-libraries=python && \ ./bootstrap.sh --prefix=/usr/local --with-toolset=gcc --without-libraries=python && \

View File

@ -26,20 +26,20 @@ function install_linux_deps() {
sudo pip3 install conan sudo pip3 install conan
elif [[ -x "$(command -v yum)" ]]; then elif [[ -x "$(command -v yum)" ]]; then
# for CentOS devtoolset-7 # for CentOS devtoolset-8
sudo yum install -y epel-release centos-release-scl-rh sudo yum install -y epel-release centos-release-scl-rh
sudo yum install -y wget curl which \ sudo yum install -y wget curl which \
git make automake python3-devel \ git make automake python3-devel \
devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran \ devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-gcc-gfortran \
llvm-toolset-7.0-clang llvm-toolset-7.0-clang-tools-extra \ llvm-toolset-8.0-clang llvm-toolset-8.0-clang-tools-extra \
libaio libuuid-devel unzip \ libaio libuuid-devel unzip \
ccache lcov libtool m4 autoconf automake ccache lcov libtool m4 autoconf automake
sudo pip3 install conan sudo pip3 install conan
echo "source scl_source enable devtoolset-7" | sudo tee -a /etc/profile.d/devtoolset-7.sh echo "source scl_source enable devtoolset-8" | sudo tee -a /etc/profile.d/devtoolset-8.sh
echo "source scl_source enable llvm-toolset-7.0" | sudo tee -a /etc/profile.d/llvm-toolset-7.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-7.0/root/usr/bin" | sudo tee -a /etc/profile.d/llvm-toolset-7.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-7.sh" source "/etc/profile.d/llvm-toolset-8.sh"
else else
echo "Error Install Dependencies ..." echo "Error Install Dependencies ..."
exit 1 exit 1

View File

@ -33,16 +33,16 @@ function install_linux_deps() {
sudo yum install -y epel-release centos-release-scl-rh && \ sudo yum install -y epel-release centos-release-scl-rh && \
sudo yum install -y git make automake ccache openssl-devel zlib-devel libzstd-devel \ sudo yum install -y git make automake ccache openssl-devel zlib-devel libzstd-devel \
libcurl-devel python3-devel \ libcurl-devel python3-devel \
devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran \ devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-gcc-gfortran \
llvm-toolset-7.0-clang llvm-toolset-7.0-clang-tools-extra llvm-toolset-8.0-clang llvm-toolset-8.0-clang-tools-extra
echo "source scl_source enable devtoolset-7" | sudo tee -a /etc/profile.d/devtoolset-7.sh echo "source scl_source enable devtoolset-8" | sudo tee -a /etc/profile.d/devtoolset-8.sh
echo "source scl_source enable llvm-toolset-7.0" | sudo tee -a /etc/profile.d/llvm-toolset-7.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-7.0/root/usr/bin" | sudo tee -a /etc/profile.d/llvm-toolset-7.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-7.sh" source "/etc/profile.d/llvm-toolset-8.sh"
# install OpenBLAS, this could take a while. # install OpenBLAS, this could take a while.
source "/etc/profile.d/devtoolset-7.sh" && \ source "/etc/profile.d/devtoolset-8.sh" && \
wget https://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz && \ wget https://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz && \
tar zxvf v0.3.9.tar.gz && cd OpenBLAS-0.3.9 && \ 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 && \ 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 && \