-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Add contents for manully build documentation(cn version) #9298
Changes from 4 commits
35bed7c
154a1db
53a4a58
4e363a4
bfbcb20
86626a7
f1f508f
909d381
62373ed
ea21f9e
abc630e
67e5433
599abc4
9bec0d2
21c7db4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,9 +19,6 @@ PaddlePaddle.org工具可以配合Docker使用,需要在系统里先安装好D | |
|
||
.. code-block:: bash | ||
|
||
mkdir paddlepaddle # Create paddlepaddle working directory | ||
cd paddlepaddle | ||
|
||
# Clone the content repositories | ||
git clone https://github.com/PaddlePaddle/Paddle.git | ||
git clone https://github.com/PaddlePaddle/book.git | ||
|
@@ -39,9 +36,6 @@ PaddlePaddle.org工具可以配合Docker使用,需要在系统里先安装好D | |
|
||
.. code-block:: bash | ||
|
||
mkdir paddlepaddle # Create paddlepaddle working directory | ||
cd paddlepaddle | ||
|
||
# Clone the content repositories and PaddlePaddle.org | ||
git clone https://github.com/PaddlePaddle/Paddle.git | ||
git clone https://github.com/PaddlePaddle/book.git | ||
|
@@ -65,17 +59,36 @@ PaddlePaddle.org工具可以配合Docker使用,需要在系统里先安装好D | |
不使用PaddlePaddle.org工具 | ||
-------------------------- | ||
|
||
使用Docker构建PaddlePaddle的文档,需要在系统里先安装好Docker工具包。Docker安装请参考 `Docker的官网 <https://docs.docker.com/>`_ 。安装好Docker之后可以使用源码目录下的脚本构建文档,即 | ||
使用Docker构建PaddlePaddle的文档,需要在系统里先安装好Docker工具包。Docker安装请参考 `Docker的官网 <https://docs.docker.com/>`_ 。该方法与 `从源码编译PaddlePaddle <http://paddlepaddle.org/docs/develop/documentation/zh/build_and_install/build_from_source_cn.html>`_ 相似,通过从源码中构建可用于编译PaddlePaddle文档的Docker镜像并运行,在进入Docker容器后使用源码中的脚本构建PaddlePaddle文档,具体步骤如下: | ||
|
||
.. code-block:: bash | ||
|
||
git clone https://github.com/PaddlePaddle/Paddle.git | ||
cd Paddle | ||
|
||
# 从源码中构建可用于编译PaddlePaddle文档的Docker镜像 | ||
docker build -t paddle:dev . | ||
docker run -it -v $PWD:/paddle -e "WITH_GPU=OFF" -e "WITH_TESTING=OFF" -e "WITH_DOC=ON" paddle:dev /bin/bash | ||
|
||
# 进入Docker容器后使用build.sh脚本构建PaddlePaddle文档 | ||
bash -x /paddle/paddle/scripts/docker/build.sh | ||
|
||
注:上述命令把当前目录(源码根目录)映射为 container 里的 :code:`/paddle` 目录。 | ||
|
||
编译完成后,进入 ``paddle/build/doc/v2`` 目录,该目录下生成了 ``cn/html/`` 、 ``en/html`` 以及 ``api/en/html`` 共三个子目录,分别进入这些目录下,执行以下命令: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 需要加上fluid目录的说明 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 使用build.sh脚本,现在也可以编译出fluid目录了吧。 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. 还是有点冗余。如果改成这样会不会好点?
|
||
|
||
.. code-block:: bash | ||
|
||
python -m SimpleHTTPServer 8088 | ||
|
||
[TBD] | ||
在浏览器中输入http://localhost:8088就可以看到编译生成的中/英文的文档页面和英文的API页面。 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. http://localhost:8088 前后可以加空格,变成网址格式。 |
||
|
||
如果不想使用Docker,也可以使用以下命令直接构建PaddlePaddle文档,即 | ||
|
||
.. code-block:: bash | ||
|
||
mkdir paddle | ||
cd paddle | ||
git clone https://github.com/PaddlePaddle/Paddle.git | ||
cd Paddle | ||
mkdir -p build | ||
cd build | ||
cmake .. -DCMAKE_BUILD_TYPE=Release -DWITH_GPU=OFF -DWITH_MKL=OFF -DWITH_DOC=ON | ||
|
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.
paddlepaddle.org里面的
mkdir
和cd
需要留下。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.
Done
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.
这里的
mkdir
和cd
还没留下。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.
Done