From 52edaecc5d00e495c87de3683b26db6d6e6d076f Mon Sep 17 00:00:00 2001 From: pangyoki Date: Tue, 9 Feb 2021 19:49:13 +0800 Subject: [PATCH] modify dockerfile: support cuda11 and delete gcc8.2 in cpu version (#30746) * support cuda11 and delete gcc8.2 in cpu version * change method * fix pip * change 11 to 11.0 --- tools/dockerfile/Dockerfile.cuda10_ubuntu18_cinn | 4 ++-- tools/dockerfile/Dockerfile.ubuntu18 | 4 ++-- tools/dockerfile/ubuntu16_dev.sh | 8 ++++++-- tools/dockerfile/ubuntu18_dev.sh | 8 ++++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/tools/dockerfile/Dockerfile.cuda10_ubuntu18_cinn b/tools/dockerfile/Dockerfile.cuda10_ubuntu18_cinn index ed4fe92a588..c021c23aec8 100644 --- a/tools/dockerfile/Dockerfile.cuda10_ubuntu18_cinn +++ b/tools/dockerfile/Dockerfile.cuda10_ubuntu18_cinn @@ -41,8 +41,8 @@ RUN apt-get update && \ python3.6 python3.6-dev \ python3.7 python3.7-dev \ python3.8 python3.8-dev && \ - curl https://bootstrap.pypa.io/ez_setup.py -o - | python2.7 && easy_install pip && \ - curl https://bootstrap.pypa.io/ez_setup.py -o - | python3.5 && easy_install pip && \ + curl https://bootstrap.pypa.io/2.7/get-pip.py -o - | python2.7 && easy_install pip && \ + curl https://bootstrap.pypa.io/3.5/get-pip.py -o - | python3.5 && easy_install pip && \ curl https://bootstrap.pypa.io/ez_setup.py -o - | python3.6 && easy_install pip && \ curl https://bootstrap.pypa.io/ez_setup.py -o - | python3.7 && easy_install pip && \ curl https://bootstrap.pypa.io/ez_setup.py -o - | python3.8 && easy_install pip && \ diff --git a/tools/dockerfile/Dockerfile.ubuntu18 b/tools/dockerfile/Dockerfile.ubuntu18 index 3fe26f5b32f..d6c4753e746 100644 --- a/tools/dockerfile/Dockerfile.ubuntu18 +++ b/tools/dockerfile/Dockerfile.ubuntu18 @@ -42,8 +42,8 @@ RUN apt-get update && \ python3.6 python3.6-dev \ python3.7 python3.7-dev \ python3.8 python3.8-dev python3.8-distutils && \ - curl https://bootstrap.pypa.io/ez_setup.py -o - | python2.7 && easy_install pip && \ - curl https://bootstrap.pypa.io/ez_setup.py -o - | python3.5 && easy_install pip && \ + curl https://bootstrap.pypa.io/2.7/get-pip.py -o - | python2.7 && easy_install pip && \ + curl https://bootstrap.pypa.io/3.5/get-pip.py -o - | python3.5 && easy_install pip && \ curl https://bootstrap.pypa.io/ez_setup.py -o - | python3.6 && easy_install pip && \ curl https://bootstrap.pypa.io/ez_setup.py -o - | python3.7 && easy_install pip && \ curl https://bootstrap.pypa.io/ez_setup.py -o - | python3.8 && easy_install pip && \ diff --git a/tools/dockerfile/ubuntu16_dev.sh b/tools/dockerfile/ubuntu16_dev.sh index de1616169b9..b7d0d8e3e2a 100755 --- a/tools/dockerfile/ubuntu16_dev.sh +++ b/tools/dockerfile/ubuntu16_dev.sh @@ -32,11 +32,15 @@ function ref_whl(){ ref_mkl=openblas fi - if [[ ${gcc_version} == "8.2.0" ]];then + if [[ ${WITH_GPU} != "ON" ]]; then + ref_gcc = "" + elif [[ ${gcc_version} == "8.2.0" ]];then ref_gcc=_gcc8.2 fi - if [[ ${ref_CUDA_MAJOR} == "10" ]];then + if [[ ${ref_CUDA_MAJOR} == "11.0" ]];then + ref_version=.post110 + elif [[ ${ref_CUDA_MAJOR} == "10" ]];then ref_version=.post100 elif [[ ${ref_CUDA_MAJOR} == "10.1" ]];then ref_version=.post101 diff --git a/tools/dockerfile/ubuntu18_dev.sh b/tools/dockerfile/ubuntu18_dev.sh index 03423b28255..19572f639bc 100755 --- a/tools/dockerfile/ubuntu18_dev.sh +++ b/tools/dockerfile/ubuntu18_dev.sh @@ -32,11 +32,15 @@ function ref_whl(){ ref_mkl=openblas fi - if [[ ${gcc_version} == "8.2.0" ]];then + if [[ ${WITH_GPU} != "ON" ]]; then + ref_gcc = "" + elif [[ ${gcc_version} == "8.2.0" ]];then ref_gcc=_gcc8.2 fi - if [[ ${ref_CUDA_MAJOR} == "10" ]];then + if [[ ${ref_CUDA_MAJOR} == "11.0" ]];then + ref_version=.post110 + elif [[ ${ref_CUDA_MAJOR} == "10" ]];then ref_version=.post100 elif [[ ${ref_CUDA_MAJOR} == "10.1" ]];then ref_version=.post101 -- GitLab