提交 25c032bb 编写于 作者: T tianshuo78520a

fix linux bug

上级 3308e3c4
...@@ -346,17 +346,17 @@ function PipLinuxInstall(){ ...@@ -346,17 +346,17 @@ function PipLinuxInstall(){
if [[ "$paddle_version" == "2" ]];then if [[ "$paddle_version" == "2" ]];then
if [[ "$GPU" == "gpu" ]];then if [[ "$GPU" == "gpu" ]];then
if [[ ${AVX} == "avx" ]];then if [[ ${AVX} == "avx" ]];then
rm -rf `echo $wheel_cpu_develop|awk -F '/' '{print $NF}'` rm -rf `echo $wheel_gpu_release|awk -F '/' '{print $NF}'`
wget $wheel_cpu_develop wget $wheel_gpu_release
$pip_path install --user -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com $wheel_gpu_release $pip_path install --user -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com $wheel_gpu_release
else else
rm -rf `echo $wheel_cpu_release_nvax|awk -F '/' '{print $NF}'` rm -rf `echo $wheel_gpu_release_novax|awk -F '/' '{print $NF}'`
wget $wheel_cpu_release_nvax 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 $pip_path install --user -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com $wheel_gpu_release_noavx
fi fi
else else
rm -rf `echo $wheel_cpu_develop|awk -F '/' '{print $NF}'` rm -rf `echo $wheel_cpu_release|awk -F '/' '{print $NF}'`
wget $wheel_cpu_develop wget $wheel_cpu_release
$pip_path install --user -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com $wheel_cpu_release $pip_path install --user -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com $wheel_cpu_release
fi fi
else else
...@@ -375,8 +375,8 @@ function PipLinuxInstall(){ ...@@ -375,8 +375,8 @@ function PipLinuxInstall(){
function checkLinuxGPU(){ function checkLinuxGPU(){
AVX=`cat /proc/cpuinfo |grep avx|tail -1|grep avx` AVX=`cat /proc/cpuinfo |grep avx|tail -1|grep avx`
which_gpu=`lspci |grep -i nvidia` which nvidia-smi >/dev/null 2>&1
if [ "$which_gpu" == "" ];then if [ "$?" != "0" ];then
GPU='cpu' GPU='cpu'
echo "您使用的是不包含支持的GPU的机器" echo "您使用的是不包含支持的GPU的机器"
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册