提交 3972dd88 编写于 作者: J JiabinYang

test=develop, refine code

上级 b17da93c
...@@ -566,14 +566,7 @@ gpu_list=("GeForce 410M" ...@@ -566,14 +566,7 @@ gpu_list=("GeForce 410M"
fi fi
fi fi
} }
function checkMacPaddleVersion(){
function macos() {
path='http://paddlepaddle.org/download?url='
AVX=`sysctl -a | grep cpu | grep AVX1.0 | tail -1 | grep AVX`
while true
do
while true while true
do do
read -p "请选择Paddle版本(默认是release): read -p "请选择Paddle版本(默认是release):
...@@ -588,7 +581,9 @@ function macos() { ...@@ -588,7 +581,9 @@ function macos() {
break break
fi fi
done done
}
function checkMacPythonVersion(){
while true while true
do do
read -p "请您选择希望使用的python版本 read -p "请您选择希望使用的python版本
...@@ -675,22 +670,35 @@ function macos() { ...@@ -675,22 +670,35 @@ function macos() {
echo "输入错误,请重新输入" echo "输入错误,请重新输入"
fi fi
done done
}
function checkMacAVX(){
if [[ $AVX != "" ]];then if [[ $AVX != "" ]];then
AVX=avx AVX=avx
else else
echo "您的Mac不支持AVX指令集,目前不能安装PaddlePaddle" echo "您的Mac不支持AVX指令集,目前不能安装PaddlePaddle"
fi fi
}
function checkMacGPU(){
if [[ $GPU != "" ]];then if [[ $GPU != "" ]];then
echo "MacOS上暂不支持GPU版本的PaddlePaddle, 将为您安装CPU版本的PaddlePaddle" echo "MacOS上暂不支持GPU版本的PaddlePaddle, 将为您安装CPU版本的PaddlePaddle"
else else
echo "MacOS上暂不支持GPU版本的PaddlePaddle, 将为您安装CPU版本的PaddlePaddle" echo "MacOS上暂不支持GPU版本的PaddlePaddle, 将为您安装CPU版本的PaddlePaddle"
GPU=cpu GPU=cpu
fi fi
}
function macos() {
path='http://paddlepaddle.org/download?url='
AVX=`sysctl -a | grep cpu | grep AVX1.0 | tail -1 | grep AVX`
while true
do
checkMacPaddleVersion
checkMacPythonVersion
checkMacAVX
checkMacGPU
wheel_cpu_release="http://paddle-wheel.bj.bcebos.com/${release_version}-${GPU}-mac/paddlepaddle-1.2.0-cp${python_brief_version}-cp${python_brief_version}m-macosx_10_6_intel.whl" wheel_cpu_release="http://paddle-wheel.bj.bcebos.com/${release_version}-${GPU}-mac/paddlepaddle-1.2.0-cp${python_brief_version}-cp${python_brief_version}m-macosx_10_6_intel.whl"
whl_cpu_release="paddlepaddle-1.2.0-cp${python_brief_version}-cp${python_brief_version}m-macosx_10_6_intel.whl" whl_cpu_release="paddlepaddle-1.2.0-cp${python_brief_version}-cp${python_brief_version}m-macosx_10_6_intel.whl"
...@@ -715,18 +723,18 @@ function macos() { ...@@ -715,18 +723,18 @@ function macos() {
if [ $? == "0" ];then if [ $? == "0" ];then
$python_root -m pip install $whl_cpu_release $python_root -m pip install $whl_cpu_release
if [ $? == "0" ];then if [ $? == "0" ];then
rm -rf $whl_cpu_release rm $whl_cpu_release
echo "安装成功,可以使用: ${python_root} 来启动安装了PaddlePaddle的Python解释器" echo "安装成功,可以使用: ${python_root} 来启动安装了PaddlePaddle的Python解释器"
break break
else else
rm -rf $whl_cpu_release rm $whl_cpu_release
echo "未能正常安装PaddlePaddle,请尝试更换您输入的python路径,或者ctrl + c退出后请检查您使用的python3对应的pip或pip源是否可用" echo "未能正常安装PaddlePaddle,请尝试更换您输入的python路径,或者ctrl + c退出后请检查您使用的python3对应的pip或pip源是否可用"
echo"" echo""
echo "==========================================================================================" echo "=========================================================================================="
echo"" echo""
fi fi
else else
rm -rf $whl_cpu_release rm $whl_cpu_release
echo "未能正常安装PaddlePaddle,请检查您的网络,或者ctrl + c退出后反馈至https://github.com/PaddlePaddle/Paddle/issues" echo "未能正常安装PaddlePaddle,请检查您的网络,或者ctrl + c退出后反馈至https://github.com/PaddlePaddle/Paddle/issues"
echo"" echo""
echo "==========================================================================================" echo "=========================================================================================="
...@@ -751,18 +759,18 @@ function macos() { ...@@ -751,18 +759,18 @@ function macos() {
if [ $? == "0" ];then if [ $? == "0" ];then
$python_root -m pip install $whl_cpu_develop $python_root -m pip install $whl_cpu_develop
if [ $? == "0" ];then if [ $? == "0" ];then
rm -rf $wheel_cpu_develop rm $wheel_cpu_develop
echo "安装成功,可以使用: ${python_root} 来启动安装了PaddlePaddle的Python解释器" echo "安装成功,可以使用: ${python_root} 来启动安装了PaddlePaddle的Python解释器"
break break
else else
rm -rf $whl_cpu_release rm $whl_cpu_release
echo "未能正常安装PaddlePaddle,请尝试更换您输入的python路径,或者ctrl + c退出后请检查您使用的python3对应的pip或pip源是否可用" echo "未能正常安装PaddlePaddle,请尝试更换您输入的python路径,或者ctrl + c退出后请检查您使用的python3对应的pip或pip源是否可用"
echo"" echo""
echo "==========================================================================================" echo "=========================================================================================="
echo"" echo""
fi fi
else else
rm -rf $whl_cpu_develop rm $whl_cpu_develop
echo "未能正常安装PaddlePaddle,请检查您的网络,或者ctrl + c退出后反馈至https://github.com/PaddlePaddle/Paddle/issues" echo "未能正常安装PaddlePaddle,请检查您的网络,或者ctrl + c退出后反馈至https://github.com/PaddlePaddle/Paddle/issues"
echo"" echo""
echo "==========================================================================================" echo "=========================================================================================="
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册