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

test=develop, refine code

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