Skip to content
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

Merged
merged 7 commits into from
May 11, 2017
Merged

Use ubuntu 16 #2040

merged 7 commits into from
May 11, 2017

Conversation

wangkuiyi
Copy link
Collaborator

@wangkuiyi wangkuiyi commented May 7, 2017

Fixes #2039

I tested this PR by

  1. run docker build -t paddle:dev . to build the development Docker image.
  2. run docker run ... paddle:dev to build the source code of PaddlePaddle.
  3. run cd build; docker build -t paddle . to build the production image.

@wangkuiyi wangkuiyi requested a review from gangliao May 7, 2017 13:11
@@ -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/
Copy link
Contributor

@gangliao gangliao May 7, 2017

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...

Copy link
Collaborator Author

@wangkuiyi wangkuiyi May 7, 2017

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?

Copy link
Contributor

@gangliao gangliao May 8, 2017

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.

Generating .deb package ...
========================================
EOF
cpack -D CPACK_GENERATOR='DEB' -D CPACK_DEBIAN_PACKAGE_DEPENDS="" ..
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it and removed!

To save the time of installing building tools, we provide a Docker image.


使用Docker构建PaddlePaddle的文档
Copy link
Contributor

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.

Copy link
Collaborator Author

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.

@gangliao
Copy link
Contributor

gangliao commented May 8, 2017

Please resolve conflicting files

Copy link
Contributor

@typhoonzero typhoonzero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

并没有看到 英文的文档:#2041

@@ -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 格式的文档
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不知道为什么但 cmake<https://cmake.org/>_ 这里的链接好像没有正确生成。

Copy link
Collaborator Author

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".

Copy link
Contributor

@typhoonzero typhoonzero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wangkuiyi wangkuiyi merged commit 49b7785 into PaddlePaddle:develop May 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants