Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
3972dd88
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
1 年多 前同步成功
通知
696
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
3972dd88
编写于
1月 21, 2019
作者:
J
JiabinYang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test=develop, refine code
上级
b17da93c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
126 addition
and
118 deletion
+126
-118
paddle/scripts/fast_install.sh
paddle/scripts/fast_install.sh
+126
-118
未找到文件。
paddle/scripts/fast_install.sh
浏览文件 @
3972dd88
...
...
@@ -566,138 +566,146 @@ 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
`
function
checkMacPaddleVersion
(){
while
true
do
while
true
do
read
-p
"请选择Paddle版本(默认是release):
输入 1 来使用develop版本
输入 2 来使用release
${
release_version
}
请输入,或者按ctrl + c退出: "
paddle_version
if
[
"
$paddle_version
"
==
"1"
]||[
"
$paddle_version
"
==
"2"
]
;
then
break
else
paddle_version
=
"2"
echo
"将会下载release版本PaddlePaddle"
break
fi
done
do
read
-p
"请选择Paddle版本(默认是release):
输入 1 来使用develop版本
输入 2 来使用release
${
release_version
}
请输入,或者按ctrl + c退出: "
paddle_version
if
[
"
$paddle_version
"
==
"1"
]||[
"
$paddle_version
"
==
"2"
]
;
then
break
else
paddle_version
=
"2"
echo
"将会下载release版本PaddlePaddle"
break
fi
done
}
while
true
do
read
-p
"请您选择希望使用的python版本
输入 2 使用python2.x
输入 3 使用python3.x
请选择(默认为2),或者按ctrl + c退出:"
python_V
if
[
"
$python_V
"
==
""
]
;
then
python_V
=
"2"
function
checkMacPythonVersion
(){
while
true
do
read
-p
"请您选择希望使用的python版本
输入 2 使用python2.x
输入 3 使用python3.x
请选择(默认为2),或者按ctrl + c退出:"
python_V
if
[
"
$python_V
"
==
""
]
;
then
python_V
=
"2"
fi
if
[
"
$python_V
"
==
"2"
]
;
then
python_root
=
`
which python2.7
`
if
[
"
$python_root
"
==
""
]
;
then
python_root
=
`
which python
`
fi
if
[
"
$python_V
"
==
"2"
]
;
then
python_root
=
`
which python2.7
`
if
[
"
$python_root
"
==
""
]
;
then
python_root
=
`
which python
`
fi
python_version
=
`
$python_root
--version
2>&1 1>&1
`
if
[
$?
==
"0"
]
;
then
:
python_version
=
`
$python_root
--version
2>&1 1>&1
`
if
[
$?
==
"0"
]
;
then
:
else
python_version
=
""
fi
if
[
"
$python_root
"
==
""
]||[
"
$python_root
"
==
"/usr/bin/python"
-a
"
$python_version
"
==
"Python 2.7.10"
]||[
"
$python_root
"
==
"/usr/bin/python2.7"
-a
"
$python_version
"
==
"Python 2.7.10"
]
;
then
check_python2
fi
while
true
do
read
-p
"找到:
$python_version
, 是否使用:(y/n),输入n来输入自定义使用的python路径,或者按ctrl + c退出: "
use_python
use_python
=
`
echo
$use_python
|
tr
'A-Z'
'a-z'
`
if
[
"
$use_python
"
==
"y"
]||[
"
$use_python
"
==
""
]
;
then
break
elif
[
"
$use_python
"
==
"n"
]
;
then
python_root
=
""
check_python2
break
else
python_version
=
""
fi
if
[
"
$python_root
"
==
""
]||[
"
$python_root
"
==
"/usr/bin/python"
-a
"
$python_version
"
==
"Python 2.7.10"
]||[
"
$python_root
"
==
"/usr/bin/python2.7"
-a
"
$python_version
"
==
"Python 2.7.10"
]
;
then
check_python2
echo
"输入错误,请重新输入"
fi
while
true
do
read
-p
"找到:
$python_version
, 是否使用:(y/n),输入n来输入自定义使用的python路径,或者按ctrl + c退出: "
use_python
use_python
=
`
echo
$use_python
|
tr
'A-Z'
'a-z'
`
if
[
"
$use_python
"
==
"y"
]||[
"
$use_python
"
==
""
]
;
then
break
elif
[
"
$use_python
"
==
"n"
]
;
then
python_root
=
""
check_python2
break
else
echo
"输入错误,请重新输入"
fi
done
done
elif
[
"
$python_V
"
==
"3"
]
;
then
python_root
=
`
which python3
`
python_version
=
`
$python_root
--version
2>&1 1>&1
`
if
[
$?
==
"0"
]
;
then
:
else
python_version
=
""
fi
if
[
"
$python_root
"
==
""
]||[
"
$python_root
"
==
"/usr/bin/python"
-a
"
$python_version
"
==
"Python 2.7.10"
]
;
then
check_python3
fi
while
true
do
read
-p
"找到:
$python_version
, 是否使用:(y/n), 输入n来输入自定义使用的python路径,或者按ctrl + c退出:"
use_python
use_python
=
`
echo
$use_python
|
tr
'A-Z'
'a-z'
`
if
[
"
$use_python
"
==
"y"
]||[
"
$use_python
"
==
""
]
;
then
break
elif
[
"
$use_python
"
==
"n"
]
;
then
check_python3
break
else
echo
"输入错误,请重新输入"
fi
done
else
elif
[
"
$python_V
"
==
"3"
]
;
then
python_root
=
`
which python3
`
python_version
=
`
$python_root
--version
2>&1 1>&1
`
if
[
$?
==
"0"
]
;
then
:
else
python_version
=
""
fi
if
[
"
$python_V
"
==
"2"
]||[
"
$python_V
"
==
"3"
]
;
then
python_brief_version
=
`
$python_root
-m
pip
-V
|awk
-F
"[ |)]"
'{print $6}'
|sed
's#\.##g'
`
if
[[
$python_brief_version
==
"27"
]]
;
then
uncode
=
`
python
-c
"import pip._internal;print(pip._internal.pep425tags.get_supported())"
|grep
"cp27"
`
if
[[
$uncode
==
""
]]
;
then
uncode
=
mu
else
uncode
=
m
fi
fi
if
[[
"
$python_brief_version
"
==
"27"
||
"
$python_brief_version
"
==
"35"
||
"
$python_brief_version
"
==
"36"
||
"
$python_brief_version
"
==
"37"
]]
;
then
if
[
"
$python_root
"
==
""
]||[
"
$python_root
"
==
"/usr/bin/python"
-a
"
$python_version
"
==
"Python 2.7.10"
]
;
then
check_python3
fi
while
true
do
read
-p
"找到:
$python_version
, 是否使用:(y/n), 输入n来输入自定义使用的python路径,或者按ctrl + c退出:"
use_python
use_python
=
`
echo
$use_python
|
tr
'A-Z'
'a-z'
`
if
[
"
$use_python
"
==
"y"
]||[
"
$use_python
"
==
""
]
;
then
break
elif
[
"
$use_python
"
==
"n"
]
;
then
check_python3
break
else
echo
"
未发现可用的pip或pip3/pip3.x, 我们只支持Python2.7/3.5/3.6/3.7及其对应的pip, 请重新输入, 或使用ctrl + c退出
"
echo
"
输入错误,请重新输入
"
fi
else
echo
"输入错误,请重新输入"
fi
done
done
else
:
fi
if
[
"
$python_V
"
==
"2"
]||[
"
$python_V
"
==
"3"
]
;
then
python_brief_version
=
`
$python_root
-m
pip
-V
|awk
-F
"[ |)]"
'{print $6}'
|sed
's#\.##g'
`
if
[[
$python_brief_version
==
"27"
]]
;
then
uncode
=
`
python
-c
"import pip._internal;print(pip._internal.pep425tags.get_supported())"
|grep
"cp27"
`
if
[[
$uncode
==
""
]]
;
then
uncode
=
mu
else
uncode
=
m
fi
fi
if
[[
"
$python_brief_version
"
==
"27"
||
"
$python_brief_version
"
==
"35"
||
"
$python_brief_version
"
==
"36"
||
"
$python_brief_version
"
==
"37"
]]
;
then
break
else
echo
"未发现可用的pip或pip3/pip3.x, 我们只支持Python2.7/3.5/3.6/3.7及其对应的pip, 请重新输入, 或使用ctrl + c退出"
fi
else
echo
"输入错误,请重新输入"
fi
done
}
if
[[
$AVX
!=
""
]]
;
then
function
checkMacAVX
(){
if
[[
$AVX
!=
""
]]
;
then
AVX
=
avx
else
else
echo
"您的Mac不支持AVX指令集,目前不能安装PaddlePaddle"
fi
fi
}
if
[[
$GPU
!=
""
]]
;
then
function
checkMacGPU
(){
if
[[
$GPU
!=
""
]]
;
then
echo
"MacOS上暂不支持GPU版本的PaddlePaddle, 将为您安装CPU版本的PaddlePaddle"
else
else
echo
"MacOS上暂不支持GPU版本的PaddlePaddle, 将为您安装CPU版本的PaddlePaddle"
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"
whl_cpu_release
=
"paddlepaddle-1.2.0-cp
${
python_brief_version
}
-cp
${
python_brief_version
}
m-macosx_10_6_intel.whl"
wheel_cpu_develop
=
"http://paddle-wheel.bj.bcebos.com/latest-cpu-mac/paddlepaddle-latest-cp
${
python_brief_version
}
-cp
${
python_brief_version
}
m-macosx_10_6_intel.whl"
whl_cpu_develop
=
"paddlepaddle-latest-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"
wheel_cpu_develop
=
"http://paddle-wheel.bj.bcebos.com/latest-cpu-mac/paddlepaddle-latest-cp
${
python_brief_version
}
-cp
${
python_brief_version
}
m-macosx_10_6_intel.whl"
whl_cpu_develop
=
"paddlepaddle-latest-cp
${
python_brief_version
}
-cp
${
python_brief_version
}
m-macosx_10_6_intel.whl"
if
[[
$paddle_version
==
"2"
]]
;
then
if
[[
$paddle_version
==
"2"
]]
;
then
if
[
-f
$whl_cpu_release
]
;
then
$python_root
-m
pip
install
$whl_cpu_release
if
[
$?
==
"0"
]
;
then
...
...
@@ -715,25 +723,25 @@ 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
"=========================================================================================="
echo
""
fi
fi
else
else
if
[
-f
$whl_cpu_develop
]
;
then
$python_root
-m
pip
install
$whl_cpu_develop
if
[
$?
==
"0"
]
;
then
...
...
@@ -751,25 +759,25 @@ 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
"=========================================================================================="
echo
""
fi
fi
fi
fi
done
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录