From c0b1db904a983e7a3e9ec46ed071195d8b7f0977 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 24 Jan 2022 12:32:49 -0600 Subject: [PATCH] Add gcc 11. (#59) --- dockerfiles/rapids.Dockerfile | 5 +++-- etc/bash-utils.sh | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dockerfiles/rapids.Dockerfile b/dockerfiles/rapids.Dockerfile index 8a27918..1a9c850 100644 --- a/dockerfiles/rapids.Dockerfile +++ b/dockerfiles/rapids.Dockerfile @@ -17,7 +17,7 @@ RUN echo 'Acquire::HTTP::Proxy "http://172.17.0.1:3142";' >> /etc/apt/apt.conf.d && apt install --no-install-recommends -y \ pkg-config apt-utils apt-transport-https software-properties-common ca-certificates \ && add-apt-repository -y ppa:git-core/ppa \ - # Needed to install compatible gcc 9/10 toolchains + # Needed to install compatible gcc toolchains && add-apt-repository -y ppa:ubuntu-toolchain-r/test \ # CUDA toolkit version usable to install `cuda-nsight-compute` and `cuda-nsight-systems` packages && NSIGHT_CUDA_VERSION=$(nvcc --version | head -n4 | tail -n1 | cut -d' ' -f5 | cut -d',' -f1 | sed "s/\./-/g") \ @@ -35,6 +35,7 @@ fi' \ graphviz \ gcc-9 g++-9 \ gcc-10 g++-10 \ + gcc-11 g++-11 \ ninja-build \ build-essential \ python3 python3-pip \ @@ -85,7 +86,7 @@ RUN update-alternatives --remove-all cc >/dev/null 2>&1 || true \ && update-alternatives --remove-all g++ >/dev/null 2>&1 || true \ && update-alternatives --remove-all gcov >/dev/null 2>&1 || true \ # Install alternatives for gcc/g++/cc/c++/gcov - && for x in 9 10; do \ + && for x in 9 10 11; do \ update-alternatives \ --install /usr/bin/gcc gcc /usr/bin/gcc-${x} ${x}0 \ --slave /usr/bin/cc cc /usr/bin/gcc-${x} \ diff --git a/etc/bash-utils.sh b/etc/bash-utils.sh index 63ed137..e5b3482 100755 --- a/etc/bash-utils.sh +++ b/etc/bash-utils.sh @@ -1138,11 +1138,11 @@ export -f lint-python; set-gcc-version() { V="${1:-}"; - if [[ $V != "9" && $V != "10" ]]; then + if [[ "$V" != "9" && "$V" != "10" && "$V" != "11" ]]; then while true; do - read -p "Please select GCC version 9 or 10: " V &2 echo "Invalid GCC version, please select 9 or 10"; + >&2 echo "Invalid GCC version, please select 9, 10, or 11"; else break; fi