diff --git a/doc/COMPILE.md b/doc/COMPILE.md index 99aa5ff8c271d7386119f55863030ac15a234d44..aaf205eb3eeddc5d099384262fd26f31b291b370 100644 --- a/doc/COMPILE.md +++ b/doc/COMPILE.md @@ -25,20 +25,20 @@ export PYTHONROOT=/usr/ #### 集成CPU版本Paddle Inference Library ``` shell -cmake -DPYTHON_INCLUDE_DIR=$PYTHONROOT/include/python2.7/ -DPYTHON_LIBRARIES=$PYTHONROOT/lib/libpython2.7.so -DPYTHON_EXECUTABLE=/home/users/dongdaxiang/software/baidu/third-party/python/bin/python -DCLIENT_ONLY=OFF .. +cmake -DPYTHON_INCLUDE_DIR=$PYTHONROOT/include/python2.7/ -DPYTHON_LIBRARIES=$PYTHONROOT/lib/libpython2.7.so -DPYTHON_EXECUTABLE=$PYTHONROOT/bin/python -DCLIENT_ONLY=OFF .. make -j10 ``` #### 集成GPU版本Paddle Inference Library ``` shell -cmake -DPYTHON_INCLUDE_DIR=$PYTHONROOT/include/python2.7/ -DPYTHON_LIBRARIES=$PYTHONROOT/lib/libpython2.7.so -DPYTHON_EXECUTABLE=/home/users/dongdaxiang/software/baidu/third-party/python/bin/python -DCLIENT_ONLY=ON -DWITH_GPU=ON .. +cmake -DPYTHON_INCLUDE_DIR=$PYTHONROOT/include/python2.7/ -DPYTHON_LIBRARIES=$PYTHONROOT/lib/libpython2.7.so -DPYTHON_EXECUTABLE=$PYTHONROOT/bin/python -DCLIENT_ONLY=OFF -DWITH_GPU=ON .. make -j10 ``` ### 编译Client部分 ``` shell -cmake -DPYTHON_INCLUDE_DIR=$PYTHONROOT/include/python2.7/ -DPYTHON_LIBRARIES=$PYTHONROOT/lib/libpython2.7.so -DPYTHON_EXECUTABLE=/home/users/dongdaxiang/software/baidu/third-party/python/bin/python -DCLIENT_ONLY=ON .. +cmake -DPYTHON_INCLUDE_DIR=$PYTHONROOT/include/python2.7/ -DPYTHON_LIBRARIES=$PYTHONROOT/lib/libpython2.7.so -DPYTHON_EXECUTABLE=$PYTHONROOT/bin/python -DCLIENT_ONLY=ON .. make -j10 ``` diff --git a/doc/CONTRIBUTE.md b/doc/CONTRIBUTE.md index d788ac275eb5c4c0d580bd14b7fd49076f641723..1d0f473ce0edfa6092ac1fe81440b53510d3f7a9 100644 --- a/doc/CONTRIBUTE.md +++ b/doc/CONTRIBUTE.md @@ -38,20 +38,27 @@ Paddle Serving uses this [Git branching model](http://nvie.com/posts/a-successfu pre-commit install ``` - Our pre-commit configuration requires clang-format 3.8 for auto-formating C/C++ code and yapf for Python. + Our pre-commit configuration requires clang-format 3.8 for auto-formating C/C++ code and yapf for Python. At the same time, cpplint and pylint are required to check the code style of C/C++ and Python respectively. You may need to install cpplint and pylint by running the following commands: + + ```bash + pip install cpplint pylint + ``` Once installed, `pre-commit` checks the style of code and documentation in every commit. We will see something like the following when you run `git commit`: ```shell $ git commit CRLF end-lines remover...............................(no files to check)Skipped - yapf.................................................(no files to check)Skipped + yapf.....................................................................Passed Check for added large files..............................................Passed Check for merge conflicts................................................Passed Check for broken symlinks................................................Passed Detect Private Key...................................(no files to check)Skipped - Fix End of Files.....................................(no files to check)Skipped - clang-formater.......................................(no files to check)Skipped + Fix End of Files.........................................................Passed + clang-format.............................................................Passed + cpplint..................................................................Passed + pylint...................................................................Passed + copyright_checker........................................................Passed [my-cool-stuff c703c041] add test file 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 233 @@ -149,6 +156,6 @@ GLOG_minloglevel=1 bin/serving 1 - WARNING -2 -ERROR +2 - ERROR 3 - FATAL (Be careful as FATAL log will generate a coredump)