From 25c032bb2cd3ed6fad93b1c589ddb3d8f32f4792 Mon Sep 17 00:00:00 2001 From: tianshuo78520a <707759223@qq.com> Date: Thu, 24 Jan 2019 15:31:28 +0800 Subject: [PATCH] fix linux bug --- paddle/scripts/fast_install.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/paddle/scripts/fast_install.sh b/paddle/scripts/fast_install.sh index 287534cd0..32dccd258 100644 --- a/paddle/scripts/fast_install.sh +++ b/paddle/scripts/fast_install.sh @@ -346,17 +346,17 @@ function PipLinuxInstall(){ if [[ "$paddle_version" == "2" ]];then if [[ "$GPU" == "gpu" ]];then if [[ ${AVX} == "avx" ]];then - rm -rf `echo $wheel_cpu_develop|awk -F '/' '{print $NF}'` - wget $wheel_cpu_develop + rm -rf `echo $wheel_gpu_release|awk -F '/' '{print $NF}'` + wget $wheel_gpu_release $pip_path install --user -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com $wheel_gpu_release else - rm -rf `echo $wheel_cpu_release_nvax|awk -F '/' '{print $NF}'` - wget $wheel_cpu_release_nvax + rm -rf `echo $wheel_gpu_release_novax|awk -F '/' '{print $NF}'` + wget $wheel_gpu_release_novax $pip_path install --user -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com $wheel_gpu_release_noavx fi else - rm -rf `echo $wheel_cpu_develop|awk -F '/' '{print $NF}'` - wget $wheel_cpu_develop + rm -rf `echo $wheel_cpu_release|awk -F '/' '{print $NF}'` + wget $wheel_cpu_release $pip_path install --user -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com $wheel_cpu_release fi else @@ -375,8 +375,8 @@ function PipLinuxInstall(){ function checkLinuxGPU(){ AVX=`cat /proc/cpuinfo |grep avx|tail -1|grep avx` - which_gpu=`lspci |grep -i nvidia` - if [ "$which_gpu" == "" ];then + which nvidia-smi >/dev/null 2>&1 + if [ "$?" != "0" ];then GPU='cpu' echo "您使用的是不包含支持的GPU的机器" else -- GitLab