Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
674d69ce
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
674d69ce
编写于
9月 09, 2016
作者:
E
emailweixu
提交者:
GitHub
9月 09, 2016
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #49 from reyoung/LazyInstallPaddleWheels
Lazy install Paddle wheels
上级
1c5514f4
62da4ad5
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
48 addition
and
11 deletion
+48
-11
.travis.yml
.travis.yml
+1
-0
paddle/scripts/submit_local.sh.in
paddle/scripts/submit_local.sh.in
+35
-0
paddle/scripts/travis/build.sh
paddle/scripts/travis/build.sh
+1
-5
paddle/scripts/travis/common.sh
paddle/scripts/travis/common.sh
+5
-0
paddle/scripts/travis/make_install.sh
paddle/scripts/travis/make_install.sh
+5
-0
paddle/scripts/travis/unittest.sh
paddle/scripts/travis/unittest.sh
+1
-2
python/CMakeLists.txt
python/CMakeLists.txt
+0
-4
未找到文件。
.travis.yml
浏览文件 @
674d69ce
...
@@ -29,6 +29,7 @@ before_install:
...
@@ -29,6 +29,7 @@ before_install:
script
:
script
:
-
paddle/scripts/travis/build.sh
-
paddle/scripts/travis/build.sh
-
paddle/scripts/travis/unittest.sh
-
paddle/scripts/travis/unittest.sh
-
paddle/scripts/travis/make_install.sh
notifications
:
notifications
:
email
:
email
:
on_success
:
change
on_success
:
change
...
...
paddle/scripts/submit_local.sh.in
浏览文件 @
674d69ce
...
@@ -43,6 +43,41 @@ fi
...
@@ -43,6 +43,41 @@ fi
export
PYTHONPATH
=
${
PWD
}
:
${
PYTHONPATH
}
export
PYTHONPATH
=
${
PWD
}
:
${
PYTHONPATH
}
# Check python lib installed or not.
pip
--help
>
/dev/null
if
[
$?
-ne
0
]
;
then
echo
"pip should be installed to run paddle."
exit
1
fi
INSTALLED_VERSION
=
`
pip freeze 2>/dev/null |
grep
'^paddle'
|
sed
's/.*==//g'
`
if
[
-z
${
INSTALLED_VERSION
}
]
;
then
INSTALLED_VERSION
=
"0.0.0"
# not installed
fi
cat
<<
EOF
| python -
from distutils.version import LooseVersion
import sys
if LooseVersion("
${
INSTALLED_VERSION
}
") < LooseVersion("@PADDLE_VERSION@"):
sys.exit(1)
else:
sys.exit(0)
EOF
if
[
$?
-eq
1
]
;
then
# Older version installed, or not installed at all
echo
"First time run paddle, need to install some python dependencies."
BASEDIR
=
$(
dirname
"
$0
"
)
pip
install
${
BASEDIR
}
/../opt/paddle/share/wheels/
*
.whl
if
[
$?
-ne
0
]
;
then
echo
"pip install wheels failed. "
echo
"Please use 'sudo paddle' at the first time you use PaddlePaddle"
echo
"PaddlePaddle will install some python dependencies automatically."
exit
1
fi
echo
"Python dependencies are installed."
fi
case
"
$1
"
in
case
"
$1
"
in
"train"
)
"train"
)
${
DEBUGGER
}
$MYDIR
/../opt/paddle/bin/paddle_trainer
${
@
:2
}
${
DEBUGGER
}
$MYDIR
/../opt/paddle/bin/paddle_trainer
${
@
:2
}
...
...
paddle/scripts/travis/build.sh
浏览文件 @
674d69ce
#!/bin/bash
#!/bin/bash
cd
`
dirname
$0
`
cd
`
dirname
$0
`
cd
../../../
source
./common.sh
set
-e
mkdir
build
cd
build
cmake ..
-DCMAKE_BUILD_TYPE
=
Debug
-DWITH_GPU
=
OFF
-DWITH_DOC
=
OFF
-DWITH_TESTING
=
ON
-DON_TRAVIS
=
ON
cmake ..
-DCMAKE_BUILD_TYPE
=
Debug
-DWITH_GPU
=
OFF
-DWITH_DOC
=
OFF
-DWITH_TESTING
=
ON
-DON_TRAVIS
=
ON
make
-j
`
nproc
`
make
-j
`
nproc
`
paddle/scripts/travis/common.sh
0 → 100755
浏览文件 @
674d69ce
#!/bin/bash
set
-e
mkdir
-p
../../../build
cd
../../../build
paddle/scripts/travis/make_install.sh
0 → 100755
浏览文件 @
674d69ce
#!/bin/bash
cd
`
dirname
$0
`
source
./common.sh
sudo
make
install
sudo
paddle version
paddle/scripts/travis/unittest.sh
浏览文件 @
674d69ce
#!/bin/bash
#!/bin/bash
set
-e
cd
`
dirname
$0
`
cd
`
dirname
$0
`
cd
../../../build
source
./common.sh
env
CTEST_OUTPUT_ON_FAILURE
=
1 make
test
ARGS
=
"-j
`
nproc
`
"
env
CTEST_OUTPUT_ON_FAILURE
=
1 make
test
ARGS
=
"-j
`
nproc
`
"
python/CMakeLists.txt
浏览文件 @
674d69ce
...
@@ -22,10 +22,6 @@ find_python_module(pip REQUIRED)
...
@@ -22,10 +22,6 @@ find_python_module(pip REQUIRED)
find_python_module
(
wheel REQUIRED
)
find_python_module
(
wheel REQUIRED
)
find_python_module
(
google.protobuf REQUIRED
)
find_python_module
(
google.protobuf REQUIRED
)
install
(
CODE
"execute_process(COMMAND
${
PYTHON_EXECUTABLE
}
setup.py install -f
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)"
)
install
(
DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/dist/
install
(
DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/dist/
DESTINATION opt/paddle/share/wheels
DESTINATION opt/paddle/share/wheels
)
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录