diff --git a/doc/COMPILE.md b/doc/COMPILE.md index 41a79f082494b0ac22bb4479a5d246cdb6882a3d..cad747c111230dd594436766bec838f35c49ff3a 100644 --- a/doc/COMPILE.md +++ b/doc/COMPILE.md @@ -9,7 +9,7 @@ - Golang: 1.9.2 and later - Git:2.17.1 and later - CMake:3.2.2 and later -- Python:2.7.2 and later +- Python:2.7.2 and later / 3.6 and later It is recommended to use Docker for compilation. We have prepared the Paddle Serving compilation environment for you: @@ -54,6 +54,8 @@ 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. + ## Compile Client ``` shell diff --git a/doc/COMPILE_CN.md b/doc/COMPILE_CN.md index eb334232d98f26e68d719d10cbe458a356738d2f..afff44b69fe81fa3eb5a4c32692590f6a47d16a1 100644 --- a/doc/COMPILE_CN.md +++ b/doc/COMPILE_CN.md @@ -9,7 +9,7 @@ - Golang: 1.9.2及以上 - Git:2.17.1及以上 - CMake:3.2.2及以上 -- Python:2.7.2及以上 +- Python:2.7.2及以上 / 3.6及以上 推荐使用Docker编译,我们已经为您准备好了Paddle Serving编译环境: @@ -54,6 +54,8 @@ make -j10 执行`make install`可以把目标产出放在`./output`目录下。 +**注意:** 编译成功后,在./core/general-server目录下会产出serving二进制文件。启动server前需要export SERVING_BIN=${path/to/serving/bin} 来让server端使用编译出的serving二进制文件。 + ## 编译Client部分 ``` shell diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index c1590fb1b36de669f89711f95c4d49aedadb0c91..5102776cea85007be7c7a25fc2c6d57dbefbf1a6 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -43,7 +43,8 @@ if (APP) add_custom_command( OUTPUT ${PADDLE_SERVING_BINARY_DIR}/.timestamp COMMAND cp -r ${CMAKE_CURRENT_SOURCE_DIR}/paddle_serving_app/ ${PADDLE_SERVING_BINARY_DIR}/python/ - COMMAND env ${py_env} ${PYTHON_EXECUTABLE} setup.py bdist_wheel) + COMMAND env ${py_env} ${PYTHON_EXECUTABLE} setup.py bdist_wheel + DEPENDS ${SERVING_APP_CORE} general_model_config_py_proto ${PY_FILES}) add_custom_target(paddle_python ALL DEPENDS ${PADDLE_SERVING_BINARY_DIR}/.timestamp) endif() diff --git a/tools/Dockerfile.centos6.devel b/tools/Dockerfile.centos6.devel index dd519a0a08bd9fc02b7ad51d248912c2a22a811d..dd5a2ef786ed8a9c239a99cabbcfe2d482e6341c 100644 --- a/tools/Dockerfile.centos6.devel +++ b/tools/Dockerfile.centos6.devel @@ -21,7 +21,7 @@ RUN yum -y install wget && \ wget https://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz && \ tar -zxf Python-2.7.5.tgz && \ cd Python-2.7.5 && \ - ./configure --prefix=/usr/local/python2.7 --enable-shared && \ + ./configure --prefix=/usr/local/python2.7 --enable-shared --enable-unicode=ucs4 && \ make all && make install && \ make clean && \ echo 'export PATH=/usr/local/python2.7/bin:$PATH' >> /root/.bashrc && \ diff --git a/tools/Dockerfile.centos6.gpu.devel b/tools/Dockerfile.centos6.gpu.devel index 3288f09d4cacc8aa7fa0bd112dc6bf97939ecde5..c34780c151e960134af5f8b448e0465b8285e8b2 100644 --- a/tools/Dockerfile.centos6.gpu.devel +++ b/tools/Dockerfile.centos6.gpu.devel @@ -21,7 +21,7 @@ RUN yum -y install wget && \ wget https://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz && \ tar -zxf Python-2.7.5.tgz && \ cd Python-2.7.5 && \ - ./configure --prefix=/usr/local/python2.7 --enable-shared && \ + ./configure --prefix=/usr/local/python2.7 --enable-shared --enable-unicode=ucs4 && \ make all && make install && \ make clean && \ echo 'export PATH=/usr/local/python2.7/bin:$PATH' >> /root/.bashrc && \