Upgrade gcc toolchain to 9.x. (#8878)
* Use new tool chain. * Use gcc-9. * Use cmake from system. * DOn't link leak.
This commit is contained in:
parent
2b2eb0d0f1
commit
f7ce0ec0df
@ -8,9 +8,6 @@ macro(enable_sanitizer sanitizer)
|
||||
if(${sanitizer} MATCHES "address")
|
||||
find_package(ASan)
|
||||
set(SAN_COMPILE_FLAGS "${SAN_COMPILE_FLAGS} -fsanitize=address")
|
||||
if (ASan_FOUND)
|
||||
link_libraries(${ASan_LIBRARY})
|
||||
endif (ASan_FOUND)
|
||||
|
||||
elseif(${sanitizer} MATCHES "thread")
|
||||
find_package(TSan)
|
||||
@ -22,16 +19,10 @@ macro(enable_sanitizer sanitizer)
|
||||
elseif(${sanitizer} MATCHES "leak")
|
||||
find_package(LSan)
|
||||
set(SAN_COMPILE_FLAGS "${SAN_COMPILE_FLAGS} -fsanitize=leak")
|
||||
if (LSan_FOUND)
|
||||
link_libraries(${LSan_LIBRARY})
|
||||
endif (LSan_FOUND)
|
||||
|
||||
elseif(${sanitizer} MATCHES "undefined")
|
||||
find_package(UBSan)
|
||||
set(SAN_COMPILE_FLAGS "${SAN_COMPILE_FLAGS} -fsanitize=undefined -fno-sanitize-recover=undefined")
|
||||
if (UBSan_FOUND)
|
||||
link_libraries(${UBSan_LIBRARY})
|
||||
endif (UBSan_FOUND)
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "Santizer ${sanitizer} not supported.")
|
||||
|
||||
@ -8,15 +8,15 @@ RUN \
|
||||
yum install -y tar unzip wget xz git centos-release-scl-rh yum-utils && \
|
||||
yum-config-manager --enable centos-sclo-rh-testing && \
|
||||
yum update -y && \
|
||||
yum install -y devtoolset-7 && \
|
||||
yum install -y devtoolset-9 && \
|
||||
# Python
|
||||
wget -nv -O conda.sh https://github.com/conda-forge/miniforge/releases/download/22.11.1-2/Mambaforge-22.11.1-2-Linux-aarch64.sh && \
|
||||
bash conda.sh -b -p /opt/mambaforge
|
||||
|
||||
ENV PATH=/opt/mambaforge/bin:$PATH
|
||||
ENV CC=/opt/rh/devtoolset-7/root/usr/bin/gcc
|
||||
ENV CXX=/opt/rh/devtoolset-7/root/usr/bin/c++
|
||||
ENV CPP=/opt/rh/devtoolset-7/root/usr/bin/cpp
|
||||
ENV CC=/opt/rh/devtoolset-9/root/usr/bin/gcc
|
||||
ENV CXX=/opt/rh/devtoolset-9/root/usr/bin/c++
|
||||
ENV CPP=/opt/rh/devtoolset-9/root/usr/bin/cpp
|
||||
ENV GOSU_VERSION 1.10
|
||||
|
||||
# Create new Conda environment
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FROM ubuntu:18.04
|
||||
FROM ubuntu:22.04
|
||||
|
||||
# Environment
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
@ -10,18 +10,15 @@ RUN \
|
||||
apt-get install -y software-properties-common && \
|
||||
add-apt-repository ppa:ubuntu-toolchain-r/test && \
|
||||
apt-get update && \
|
||||
apt-get install -y tar unzip wget git build-essential doxygen graphviz llvm libasan2 libidn11 ninja-build gcc-8 g++-8 openjdk-8-jdk-headless && \
|
||||
# CMake
|
||||
wget -nv -nc https://cmake.org/files/v3.18/cmake-3.18.0-Linux-x86_64.sh --no-check-certificate && \
|
||||
bash cmake-3.18.0-Linux-x86_64.sh --skip-license --prefix=/usr && \
|
||||
apt-get install -y tar unzip wget git build-essential doxygen graphviz llvm libidn12 cmake ninja-build gcc-9 g++-9 openjdk-8-jdk-headless && \
|
||||
# Python
|
||||
wget -nv -O conda.sh https://github.com/conda-forge/miniforge/releases/download/22.11.1-2/Mambaforge-22.11.1-2-Linux-x86_64.sh && \
|
||||
bash conda.sh -b -p /opt/mambaforge
|
||||
|
||||
ENV PATH=/opt/mambaforge/bin:$PATH
|
||||
ENV CC=gcc-8
|
||||
ENV CXX=g++-8
|
||||
ENV CPP=cpp-8
|
||||
ENV CC=gcc-9
|
||||
ENV CXX=g++-9
|
||||
ENV CPP=cpp-9
|
||||
|
||||
ENV GOSU_VERSION 1.10
|
||||
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
|
||||
|
||||
@ -10,7 +10,7 @@ RUN \
|
||||
yum install -y epel-release centos-release-scl && \
|
||||
yum-config-manager --enable centos-sclo-rh-testing && \
|
||||
yum -y update && \
|
||||
yum install -y tar unzip wget xz git which ninja-build devtoolset-8-gcc devtoolset-8-binutils devtoolset-8-gcc-c++ && \
|
||||
yum install -y tar unzip wget xz git which ninja-build devtoolset-9-gcc devtoolset-9-binutils devtoolset-9-gcc-c++ && \
|
||||
# Python
|
||||
wget -nv -O conda.sh https://github.com/conda-forge/miniforge/releases/download/22.11.1-2/Mambaforge-22.11.1-2-Linux-x86_64.sh && \
|
||||
bash conda.sh -b -p /opt/mambaforge && \
|
||||
@ -30,9 +30,9 @@ RUN \
|
||||
rm -f nvidia-machine-learning-repo-rhel7-1.0.0-1.x86_64.rpm;
|
||||
|
||||
ENV PATH=/opt/mambaforge/bin:/usr/local/ninja:$PATH
|
||||
ENV CC=/opt/rh/devtoolset-8/root/usr/bin/gcc
|
||||
ENV CXX=/opt/rh/devtoolset-8/root/usr/bin/c++
|
||||
ENV CPP=/opt/rh/devtoolset-8/root/usr/bin/cpp
|
||||
ENV CC=/opt/rh/devtoolset-9/root/usr/bin/gcc
|
||||
ENV CXX=/opt/rh/devtoolset-9/root/usr/bin/c++
|
||||
ENV CPP=/opt/rh/devtoolset-9/root/usr/bin/cpp
|
||||
|
||||
ENV GOSU_VERSION 1.10
|
||||
|
||||
|
||||
@ -12,16 +12,16 @@ RUN \
|
||||
yum install -y tar unzip wget xz git which ninja-build readline-devel libX11-devel libXt-devel \
|
||||
xorg-x11-server-devel openssl-devel zlib-devel bzip2-devel xz-devel \
|
||||
pcre-devel libcurl-devel texlive-* \
|
||||
devtoolset-8-gcc devtoolset-8-binutils devtoolset-8-gcc-c++ \
|
||||
devtoolset-8-gcc-gfortran devtoolset-8-libquadmath-devel \
|
||||
devtoolset-8-runtime devtoolset-8-libstdc++-devel
|
||||
devtoolset-9-gcc devtoolset-9-binutils devtoolset-9-gcc-c++ \
|
||||
devtoolset-9-gcc-gfortran devtoolset-9-libquadmath-devel \
|
||||
devtoolset-9-runtime devtoolset-9-libstdc++-devel
|
||||
|
||||
ENV PATH=/opt/mambaforge/bin:/usr/local/ninja:/opt/software/packages/bin:/opt/R/3.3.0/bin:$PATH
|
||||
ENV LD_LIBRARY_PATH=/opt/software/packages/lib:/opt/R/3.3.0/lib64:$LD_LIBRARY_PATH
|
||||
ENV CC=/opt/rh/devtoolset-8/root/usr/bin/gcc
|
||||
ENV CXX=/opt/rh/devtoolset-8/root/usr/bin/c++
|
||||
ENV CPP=/opt/rh/devtoolset-8/root/usr/bin/cpp
|
||||
ENV F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran
|
||||
ENV CC=/opt/rh/devtoolset-9/root/usr/bin/gcc
|
||||
ENV CXX=/opt/rh/devtoolset-9/root/usr/bin/c++
|
||||
ENV CPP=/opt/rh/devtoolset-9/root/usr/bin/cpp
|
||||
ENV F77=/opt/rh/devtoolset-9/root/usr/bin/gfortran
|
||||
|
||||
# R 3.3.0
|
||||
RUN \
|
||||
|
||||
@ -6,8 +6,8 @@ RUN \
|
||||
yum-config-manager --enable centos-sclo-rh-testing && \
|
||||
yum -y update && \
|
||||
yum install -y tar unzip make bzip2 wget xz git which ninja-build java-1.8.0-openjdk-devel \
|
||||
devtoolset-8-gcc devtoolset-8-binutils devtoolset-8-gcc-c++ \
|
||||
devtoolset-8-runtime devtoolset-8-libstdc++-devel && \
|
||||
devtoolset-9-gcc devtoolset-9-binutils devtoolset-9-gcc-c++ \
|
||||
devtoolset-9-runtime devtoolset-9-libstdc++-devel && \
|
||||
# Python
|
||||
wget -nv -O conda.sh https://github.com/conda-forge/miniforge/releases/download/22.11.1-2/Mambaforge-22.11.1-2-Linux-x86_64.sh && \
|
||||
bash conda.sh -b -p /opt/mambaforge && \
|
||||
@ -20,9 +20,9 @@ RUN \
|
||||
ln -s /opt/apache-maven-3.6.1/ /opt/maven
|
||||
|
||||
ENV PATH=/opt/mambaforge/bin:/opt/maven/bin:$PATH
|
||||
ENV CC=/opt/rh/devtoolset-8/root/usr/bin/gcc
|
||||
ENV CXX=/opt/rh/devtoolset-8/root/usr/bin/c++
|
||||
ENV CPP=/opt/rh/devtoolset-8/root/usr/bin/cpp
|
||||
ENV CC=/opt/rh/devtoolset-9/root/usr/bin/gcc
|
||||
ENV CXX=/opt/rh/devtoolset-9/root/usr/bin/c++
|
||||
ENV CPP=/opt/rh/devtoolset-9/root/usr/bin/cpp
|
||||
|
||||
# Install Python packages
|
||||
RUN \
|
||||
|
||||
@ -10,7 +10,7 @@ RUN \
|
||||
yum install -y epel-release centos-release-scl && \
|
||||
yum-config-manager --enable centos-sclo-rh-testing && \
|
||||
yum -y update && \
|
||||
yum install -y tar unzip wget xz git which ninja-build java-1.8.0-openjdk-devel devtoolset-8-gcc devtoolset-8-binutils devtoolset-8-gcc-c++ && \
|
||||
yum install -y tar unzip wget xz git which ninja-build java-1.8.0-openjdk-devel devtoolset-9-gcc devtoolset-9-binutils devtoolset-9-gcc-c++ && \
|
||||
# Python
|
||||
wget -nv -O conda.sh https://github.com/conda-forge/miniforge/releases/download/22.11.1-2/Mambaforge-22.11.1-2-Linux-x86_64.sh && \
|
||||
bash conda.sh -b -p /opt/mambaforge && \
|
||||
@ -31,9 +31,9 @@ RUN \
|
||||
yum install -y libnccl-${NCCL_VERSION}+cuda${CUDA_SHORT} libnccl-devel-${NCCL_VERSION}+cuda${CUDA_SHORT} libnccl-static-${NCCL_VERSION}+cuda${CUDA_SHORT}
|
||||
|
||||
ENV PATH=/opt/mambaforge/bin:/opt/maven/bin:$PATH
|
||||
ENV CC=/opt/rh/devtoolset-8/root/usr/bin/gcc
|
||||
ENV CXX=/opt/rh/devtoolset-8/root/usr/bin/c++
|
||||
ENV CPP=/opt/rh/devtoolset-8/root/usr/bin/cpp
|
||||
ENV CC=/opt/rh/devtoolset-9/root/usr/bin/gcc
|
||||
ENV CXX=/opt/rh/devtoolset-9/root/usr/bin/c++
|
||||
ENV CPP=/opt/rh/devtoolset-9/root/usr/bin/cpp
|
||||
|
||||
# Install Python packages
|
||||
RUN \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user