Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
7f5338a7
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
694
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7f5338a7
编写于
8月 16, 2017
作者:
Y
Yu Yang
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' of github.com:baidu/Paddle into feature/remove_shared_ptr
上级
8c653ba7
8fe6db3d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
25 addition
and
61 deletion
+25
-61
doc/getstarted/build_and_install/build_from_source_en.md
doc/getstarted/build_and_install/build_from_source_en.md
+7
-6
paddle/platform/enforce.h
paddle/platform/enforce.h
+1
-1
paddle/scripts/docker/build.sh
paddle/scripts/docker/build.sh
+3
-23
paddle/scripts/submit_local.sh.in
paddle/scripts/submit_local.sh.in
+5
-24
python/setup.py.in
python/setup.py.in
+9
-7
未找到文件。
doc/getstarted/build_and_install/build_from_source_en.md
浏览文件 @
7f5338a7
...
...
@@ -68,7 +68,7 @@ As a simple example, consider the following:
1.
**BLAS Dependencies(optional)**
CMake will search BLAS libraries from system. If not found, OpenBLAS will be downloaded, built and installed automatically.
CMake will search BLAS libraries from
the
system. If not found, OpenBLAS will be downloaded, built and installed automatically.
To utilize preinstalled BLAS, you can simply specify MKL, OpenBLAS or ATLAS via
`MKL_ROOT`
,
`OPENBLAS_ROOT`
or
`ATLAS_ROOT`
.
```bash
...
...
@@ -131,9 +131,9 @@ As a simple example, consider the following:
To build GPU version, you will need the following installed:
1. a CUDA-capable GPU
2. A supported version of Linux with a
gcc
compiler and toolchain
2. A supported version of Linux with a
GCC
compiler and toolchain
3. NVIDIA CUDA Toolkit (available at http://developer.nvidia.com/cuda-downloads)
4. NVIDIA cuDNN Library (availab
el
at https://developer.nvidia.com/cudnn)
4. NVIDIA cuDNN Library (availab
le
at https://developer.nvidia.com/cudnn)
The CUDA development environment relies on tight integration with the host development environment,
including the host compiler and C runtime libraries, and is therefore only supported on
...
...
@@ -172,6 +172,7 @@ export PATH=<path to install>/bin:$PATH
# install PaddlePaddle Python modules.
sudo
pip
install
<path to
install
>
/opt/paddle/share/wheels/
*
.whl
```
## <span id="centos">Build on Centos 7</span>
### Install Dependencies
...
...
@@ -192,9 +193,9 @@ sudo pip install <path to install>/opt/paddle/share/wheels/*.whl
To build GPU version, you will need the following installed:
1. a CUDA-capable GPU
2. A supported version of Linux with a
gcc
compiler and toolchain
2. A supported version of Linux with a
GCC
compiler and toolchain
3. NVIDIA CUDA Toolkit (available at http://developer.nvidia.com/cuda-downloads)
4. NVIDIA cuDNN Library (availab
el
at https://developer.nvidia.com/cudnn)
4. NVIDIA cuDNN Library (availab
le
at https://developer.nvidia.com/cudnn)
The CUDA development environment relies on tight integration with the host development environment,
including the host compiler and C runtime libraries, and is therefore only supported on
...
...
@@ -222,7 +223,7 @@ mkdir build && cd build
```
Finally, you can build and install PaddlePaddle:
```
bash
# you can add build option here, such as:
cmake3 ..
-DCMAKE_INSTALL_PREFIX
=
<path to
install
>
...
...
paddle/platform/enforce.h
浏览文件 @
7f5338a7
...
...
@@ -86,7 +86,7 @@ struct EnforceNotMet : public std::exception {
2
+
sizeof
(
void
*
)
*
2
,
call_stack
[
i
],
demangled
,
addr_offset
);
}
else
{
sout
<<
string
::
Sprintf
(
"%-3d %*0p
%s
\n
"
,
i
,
2
+
sizeof
(
void
*
)
*
2
,
sout
<<
string
::
Sprintf
(
"%-3d %*0p
\n
"
,
i
,
2
+
sizeof
(
void
*
)
*
2
,
call_stack
[
i
]);
}
}
...
...
paddle/scripts/docker/build.sh
浏览文件 @
7f5338a7
...
...
@@ -120,25 +120,6 @@ EOF
/woboq/indexgenerator/codebrowser_indexgenerator
$WOBOQ_OUT
fi
# generate deb package for current build
# FIXME(typhoonzero): should we remove paddle/scripts/deb ?
if
[[
${
WITH_DEB
:-
ON
}
==
"ON"
]]
;
then
cat
<<
EOF
========================================
Generating .deb package ...
========================================
EOF
set
+e
cpack
-D
CPACK_GENERATOR
=
'DEB'
-j
`
nproc
`
..
err_code
=
$?
if
[
${
err_code
}
-ne
0
]
;
then
# cat error logs if cpack failed.
cat
/paddle/build/_CPack_Packages/Linux/DEB/PreinstallOutput.log
exit
${
err_code
}
fi
set
-e
fi
cat
<<
EOF
========================================
Generate /paddle/build/Dockerfile ...
...
...
@@ -158,14 +139,13 @@ EOF
fi
cat
>>
/paddle/build/Dockerfile
<<
EOF
# Use different deb file when building different type of images
ADD *.deb /
ADD python/dist/*.whl /
# run paddle version to install python packages first
RUN apt-get update &&
\
apt-get install -y wget python-pip && pip install -U pip &&
\
dpkg -i /*.deb
; apt-get install -f -y &&
\
pip install /*.whl
; apt-get install -f -y &&
\
apt-get clean -y &&
\
rm -f /*.
deb
&&
\
rm -f /*.
whl
&&
\
paddle version
${
DOCKERFILE_CUDNN_DSO
}
${
DOCKERFILE_GPU_ENV
}
...
...
paddle/scripts/submit_local.sh.in
浏览文件 @
7f5338a7
...
...
@@ -56,8 +56,7 @@ if [ -z "${PADDLE_NO_STAT+x}" ]; then
fi
fi
MYDIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
PADDLE_BIN_PATH
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
if
[
!
-z
"
${
DEBUGGER
}
"
]
;
then
echo
"Using debug command
${
DEBUGGER
}
"
...
...
@@ -93,34 +92,16 @@ 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."
# setuptools normalizes package version, so we need to use normalized
# package version for paddle python package
PYTHON_PADDLE_VERSION
=
$(
python
-c
'import packaging.version
import setuptools
print str(packaging.version.Version("@PADDLE_VERSION@"))
'
2>/dev/null
)
BASEDIR
=
$(
dirname
"
$0
"
)
pip
install
${
BASEDIR
}
/../opt/paddle/share/wheels/
*
-
${
PYTHON_PADDLE_VERSION
}
-
*
.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
"train"
)
${
DEBUGGER
}
$
MYDIR
/../opt/paddle/bin
/paddle_trainer
${
@
:2
}
${
DEBUGGER
}
$
PADDLE_BIN_PATH
/paddle_trainer
${
@
:2
}
;;
"merge_model"
)
${
DEBUGGER
}
$
MYDIR
/../opt/paddle/bin
/paddle_merge_model
${
@
:2
}
${
DEBUGGER
}
$
PADDLE_BIN_PATH
/paddle_merge_model
${
@
:2
}
;;
"pserver"
)
${
DEBUGGER
}
$
MYDIR
/../opt/paddle/bin
/paddle_pserver_main
${
@
:2
}
${
DEBUGGER
}
$
PADDLE_BIN_PATH
/paddle_pserver_main
${
@
:2
}
;;
"dump_config"
)
python
-m
paddle.utils.dump_config
${
@
:2
}
...
...
@@ -129,7 +110,7 @@ case "$1" in
python
-m
paddle.utils.make_model_diagram
${
@
:2
}
;;
"usage"
)
$
MYDIR
/../opt/paddle/bin
/paddle_usage
${
@
:2
}
$
PADDLE_BIN_PATH
/paddle_usage
${
@
:2
}
;;
"version"
)
version
...
...
python/setup.py.in
浏览文件 @
7f5338a7
...
...
@@ -24,14 +24,17 @@ if '${CMAKE_SYSTEM_PROCESSOR}' not in ['arm', 'armv7-a', 'aarch64']:
setup_requires+=["opencv-python"]
# the prefix is sys.prefix which should always be usr
paddle_bin_dir = '
local/
opt/paddle/bin'
paddle_bin_dir = 'opt/paddle/bin'
paddle_bins = ['${PADDLE_BINARY_DIR}/paddle/scripts/paddle_usage',
'${PADDLE_BINARY_DIR}/paddle/trainer/paddle_trainer',
'${PADDLE_BINARY_DIR}/paddle/trainer/paddle_merge_model',
'${PADDLE_BINARY_DIR}/paddle/pserver/paddle_pserver_main']
'${PADDLE_BINARY_DIR}/paddle/pserver/paddle_pserver_main',
'${PADDLE_BINARY_DIR}/paddle/scripts/paddle']
paddle_rt_lib_dir = 'local/lib'
paddle_rt_libs = [] if '${MKL_SHARED_LIBS}'== '' else '${MKL_SHARED_LIBS}'.split(';')
paddle_rt_lib_dir = 'lib'
paddle_rt_libs = ['${WARPCTC_LIBRARIES}']
if '${MKL_SHARED_LIBS}'!= '':
paddle_rt_libs += '${MKL_SHARED_LIBS}'.split(';')
setup(name='paddlepaddle',
version='${PADDLE_VERSION}',
...
...
@@ -50,8 +53,7 @@ setup(name='paddlepaddle',
'paddle.v2.framework.proto': '${PADDLE_BINARY_DIR}/paddle/framework',
'py_paddle': '${PADDLE_SOURCE_DIR}/paddle/py_paddle'
},
scripts=
['${PADDLE_BINARY_DIR}/paddle/scripts/paddle']
,
scripts=
paddle_bins
,
distclass=BinaryDistribution,
data_files=[(paddle_bin_dir, paddle_bins),
(paddle_rt_lib_dir, paddle_rt_libs)]
data_files=[(paddle_rt_lib_dir, paddle_rt_libs)]
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录