-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ubuntu 16 #2040
Use ubuntu 16 #2040
Conversation
paddle/api/CMakeLists.txt
Outdated
@@ -92,7 +92,9 @@ add_custom_command(OUTPUT ${PROJ_ROOT}/paddle/py_paddle/_swig_paddle.so | |||
# TODO(yuyang18) : make wheel name calculated by cmake | |||
add_custom_target(python_api_wheel ALL DEPENDS ${PROJ_ROOT}/paddle/py_paddle/_swig_paddle.so) | |||
|
|||
install(DIRECTORY ${PROJ_ROOT}/paddle/dist/ DESTINATION opt/paddle/share/wheels) | |||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/dist/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wheel package will be generated in ${PROJ_ROOT}/paddle/dist/
automatically. It cannot be controlled by CMake.
After compilation, I checked where is *.whl
.
gangl@GangLiao ~/b/Paddle> find . -name "*.whl"
./paddle/dist/py_paddle-0.10.0rc4-py2-none-any.whl
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/dist/ DESTINATION opt/paddle/share/wheels)
means that copy *.whl
from ${CMAKE_CURRENT_BINARY_DIR}/dist/
to DESTINATION opt/paddle/share/wheels
Because *.whl
does not exist in ${CMAKE_CURRENT_BINARY_DIR}/dist/
, it will cause a compile error...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Does that mean that we should just keep it ${PROJ_ROOT}/paddle/dist
?
It works after I changed it to be ${CMAKE_CURRENT_SOURCE_DIR}/dist
. I think this refers to the same directory as ${PROJ_ROOT}/paddle/dist
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. ${CMAKE_CURRENT_SOURCE_DIR} means the current source code directory.
${CMAKE_SOURCE_DIR} denotes the root directory of source code.
paddle/scripts/docker/build.sh
Outdated
Generating .deb package ... | ||
======================================== | ||
EOF | ||
cpack -D CPACK_GENERATOR='DEB' -D CPACK_DEBIAN_PACKAGE_DEPENDS="" .. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should remove -D CPACK_DEBIAN_PACKAGE_DEPENDS=""
. I added this before because the base image is python:2.7.13-slim
which installs python by building from source code. Install Paddle wheel
package will install another version of python in the image, so I removed the dependencies. Now we are using apt-get
to install python and python header files, so dependencies will not break when install.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it and removed!
doc/howto/dev/write_docs_en.rst
Outdated
To save the time of installing building tools, we provide a Docker image. | ||
|
||
|
||
使用Docker构建PaddlePaddle的文档 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All written work inwrite_docs_en.rst
must be in English.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me remove this file from this PR and do it in another PR.
Please resolve conflicting files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
并没有看到 英文的文档:#2041 ?
doc/howto/dev/write_docs_cn.rst
Outdated
@@ -2,14 +2,13 @@ | |||
如何贡献/修改文档 | |||
################## | |||
|
|||
PaddlePaddle的文档包括英文文档 ``doc`` 和中文文档 ``doc_cn`` 两个部分。文档都是通过 `cmake`_ 驱动 `sphinx`_ 编译生成,生成后的文档分别存储在编译目录的 ``doc`` 和 ``doc_cn`` 两个子目录下。 | |||
PaddlePaddle的文档文件都在 :code:`doc` 这个子目录里。源文件是 `RST <http://docutils.sourceforge.net/docs/user/rst/quickref.html>`_ 格式的。 在编译PaddlePaddle源码的时候,可以选择让 `cmake<https://cmake.org/>`_ 调用 `sphinx <http://www.sphinx-doc.org/en/1.4.8/>`_ 从 RST 文件生成 HTML 格式的文档。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不知道为什么但 cmake<https://cmake.org/>
_ 这里的链接好像没有正确生成。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@typhoonzero You are right. I am removing the claim of fixing #2041 from this PR. Also, I am abandoning my change to the Chinese document so to make this PR focusing on "Using Ubuntu 16".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #2039
I tested this PR by
docker build -t paddle:dev .
to build the development Docker image.docker run ... paddle:dev
to build the source code of PaddlePaddle.cd build; docker build -t paddle .
to build the production image.