diff --git a/doc/COMPILE.md b/doc/COMPILE.md index cad747c111230dd594436766bec838f35c49ff3a..f61ac061883581090087a2202e694c9a07468c5f 100644 --- a/doc/COMPILE.md +++ b/doc/COMPILE.md @@ -16,7 +16,11 @@ It is recommended to use Docker for compilation. We have prepared the Paddle Ser - CPU: `hub.baidubce.com/paddlepaddle/serving:0.2.0-devel`,dockerfile: [Dockerfile.devel](../tools/Dockerfile.devel) - GPU: `hub.baidubce.com/paddlepaddle/serving:0.2.0-gpu-devel`,dockerfile: [Dockerfile.gpu.devel](../tools/Dockerfile.gpu.devel) -This document will take Python2 as an example to show how to compile Paddle Serving. If you want to compile with Python 3, just adjust the Python options of cmake. +This document will take Python2 as an example to show how to compile Paddle Serving. If you want to compile with Python3, just adjust the Python options of cmake: + +- Set `DPYTHON_INCLUDE_DIR` to `$PYTHONROOT/include/python3.6m/` +- Set `DPYTHON_LIBRARIES` to `$PYTHONROOT/lib64/libpython3.6.so` +- Set `DPYTHON_EXECUTABLE` to `$PYTHONROOT/bin/python3` ## Get Code @@ -54,7 +58,7 @@ make -j10 execute `make install` to put targets under directory `./output` -**Attention:**After the compilation is successful, the serving binary file will be generated in the ./core/general-server directory. Before starting the server, export SERVING_BIN = $ {path / to / serving / bin} is required to allow the server to use the compiled serving binary file. +**Attention:** After the compilation is successful, you need to set the path of `SERVING_BIN`. See [Note](https://github.com/PaddlePaddle/Serving/blob/develop/doc/COMPILE.md#Note) for details. ## Compile Client diff --git a/doc/COMPILE_CN.md b/doc/COMPILE_CN.md index afff44b69fe81fa3eb5a4c32692590f6a47d16a1..c6e5426f02335598277ceb40fafc5215c7f03b2b 100644 --- a/doc/COMPILE_CN.md +++ b/doc/COMPILE_CN.md @@ -16,7 +16,11 @@ - CPU: `hub.baidubce.com/paddlepaddle/serving:0.2.0-devel`,dockerfile: [Dockerfile.devel](../tools/Dockerfile.devel) - GPU: `hub.baidubce.com/paddlepaddle/serving:0.2.0-gpu-devel`,dockerfile: [Dockerfile.gpu.devel](../tools/Dockerfile.gpu.devel) -本文档将以Python2为例介绍如何编译Paddle Serving。如果您想用Python3进行编译,只需要调整cmake的Python相关选项即可。 +本文档将以Python2为例介绍如何编译Paddle Serving。如果您想用Python3进行编译,只需要调整cmake的Python相关选项即可: + +- 将`DPYTHON_INCLUDE_DIR`设置为`$PYTHONROOT/include/python3.6m/` +- 将`DPYTHON_LIBRARIES`设置为`$PYTHONROOT/lib64/libpython3.6.so` +- 将`DPYTHON_EXECUTABLE`设置为`$PYTHONROOT/bin/python3` ## 获取代码 @@ -54,7 +58,7 @@ make -j10 执行`make install`可以把目标产出放在`./output`目录下。 -**注意:** 编译成功后,在./core/general-server目录下会产出serving二进制文件。启动server前需要export SERVING_BIN=${path/to/serving/bin} 来让server端使用编译出的serving二进制文件。 +**注意:** 编译成功后,需要设置`SERVING_BIN`路径,详见后面的[注意事项](https://github.com/PaddlePaddle/Serving/blob/develop/doc/COMPILE_CN.md#注意事项)。 ## 编译Client部分