Skip to content

Add contents for manully build documentation(cn version)#9298

Merged
luotao1 merged 15 commits intoPaddlePaddle:developfrom
weixing02:build_manually
Apr 11, 2018
Merged

Add contents for manully build documentation(cn version)#9298
luotao1 merged 15 commits intoPaddlePaddle:developfrom
weixing02:build_manually

Conversation

@weixing02
Copy link
Collaborator

Add some contents on how to use docker to manually build documentation(without using PaddlePaddle.org tool)

@weixing02 weixing02 requested a review from luotao1 March 21, 2018 11:16
.. code-block:: bash

mkdir paddle
cd paddle
Copy link
Contributor

Choose a reason for hiding this comment

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

mkdir paddle
cd paddle

文档里面所有的都可以去掉了,显得有点多余。

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done


# 从源码中构建可用于编译PaddlePaddle文档的Docker镜像
docker build -t paddle:dev .
docker run -it -v $PWD:/paddle -e "WITH_GPU=OFF" -e "WITH_TESTING=OFF" paddle:dev /bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

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

78行里不需要 -e "WITH_DOC=ON"么,build.sh里面这个开关默认是关闭的。

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

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

可以修改对应的英文文档。

@@ -18,9 +18,6 @@ PaddlePaddle.org工具可以配合Docker使用,需要在系统里先安装好D

.. code-block:: bash
Copy link
Contributor

Choose a reason for hiding this comment

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

paddlepaddle.org里面的mkdircd需要留下。

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

Choose a reason for hiding this comment

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

这里的mkdircd还没留下。

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@@ -18,9 +18,6 @@ PaddlePaddle.org工具可以配合Docker使用,需要在系统里先安装好D

.. code-block:: bash
Copy link
Contributor

Choose a reason for hiding this comment

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

这里的mkdircd还没留下。

python -m SimpleHTTPServer 8088

[TBD]
在浏览器中输入http://localhost:8088就可以看到编译生成的中/英文的文档页面和英文的API页面。
Copy link
Contributor

Choose a reason for hiding this comment

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

http://localhost:8088 前后可以加空格,变成网址格式。


注:上述命令把当前目录(源码根目录)映射为 container 里的 :code:`/paddle` 目录。

编译完成后,进入 ``paddle/build/doc/v2`` 目录,该目录下生成了 ``cn/html/`` 、 ``en/html`` 以及 ``api/en/html`` 共三个子目录,分别进入这些目录下,执行以下命令:
Copy link
Contributor

Choose a reason for hiding this comment

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

需要加上fluid目录的说明

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

Choose a reason for hiding this comment

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

使用build.sh脚本,现在也可以编译出fluid目录了吧。
84-90行内容,与110-116行内容一样,是否保留一处即可。

Copy link
Collaborator Author

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.

还是有点冗余。如果改成这样会不会好点?

  • 使用PaddlePaddle.org工具
    • 使用Docker工具
    • 使用Django框架
    • 预览效果(等预览工具完成后补上)
  • 使用PaddlePaddle.org工具
    • 使用Docker工具
    • 直接构建
    • 预览效果
@luotao1 luotao1 merged commit 9857ff1 into PaddlePaddle:develop Apr 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants