diff --git a/doc/howto/dev/write_docs_cn.rst b/doc/howto/dev/write_docs_cn.rst index c8ecbc94b9549a1696781cf333980ea629dd31ce..fb22b473f89027fd1613283525429628b6c4cfe3 100644 --- a/doc/howto/dev/write_docs_cn.rst +++ b/doc/howto/dev/write_docs_cn.rst @@ -19,19 +19,15 @@ PaddlePaddle的文档构建有直接构建和基于Docker构建两种方式。 .. code-block:: bash cd TO_YOUR_PADDLE_CLONE_PATH - cd paddle/scripts/tools/build_docs - bash build_docs.sh + bash paddle/scripts/tools/build_docs.sh -编译完成后,该目录下会生成如下两个子目录\: +编译完成后,会在当前目录生成两个子目录,build与build_doc,其中build_doc/doc目录之下包含两个子目录\: -* doc 英文文档目录 -* doc_cn 中文文档目录 +* en 英文文档目录 +* cn 中文文档目录 打开浏览器访问对应目录下的index.html即可访问本地文档。 -.. code-block:: bash - - open doc_cn/index.html 直接构建PaddlePaddle的文档 diff --git a/paddle/scripts/tools/build_docs/Dockerfile b/paddle/scripts/tools/build_docs/Dockerfile deleted file mode 100644 index 78dc756bd1175019d90fc852635497fea1eb55e2..0000000000000000000000000000000000000000 --- a/paddle/scripts/tools/build_docs/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM paddledev/paddle:cpu-devel-latest -COPY build.sh / -RUN pip install sphinx &&\ - pip install sphinx_rtd_theme &&\ - apt install -y doxygen graphviz &&\ - pip install recommonmark numpy protobuf==2.6.1 -CMD /build.sh diff --git a/paddle/scripts/tools/build_docs/build.sh b/paddle/scripts/tools/build_docs/build.sh deleted file mode 100755 index a23b6e61d45926e77015365627bfb7dca303ac65..0000000000000000000000000000000000000000 --- a/paddle/scripts/tools/build_docs/build.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -ex - -mkdir -p /build -cd /build -cmake /paddle -DWITH_DOC=ON -make paddle_docs paddle_docs_cn -j `nproc` -mkdir -p /output/doc -mkdir -p /output/doc_cn -cp -r doc/html/* /output/doc/ -cp -r doc_cn/html/* /output/doc_cn/ -cd / -rm -rf /paddle/build diff --git a/paddle/scripts/tools/build_docs/build_docs.sh b/paddle/scripts/tools/build_docs/build_docs.sh index 9f8b80435c8fb17907d7da52c864a448f0d8d136..fb8c26a69ad65c7f90b06d8b36d51b6d779cf76e 100755 --- a/paddle/scripts/tools/build_docs/build_docs.sh +++ b/paddle/scripts/tools/build_docs/build_docs.sh @@ -1,4 +1,3 @@ #!/bin/bash set -e -docker build . -t paddle_build_doc -docker run --rm -v $PWD/../../../../:/paddle -v $PWD:/output paddle_build_doc +docker run --rm -v $PWD:/paddle -e "WITH_GPU=OFF" -e "WITH_AVX=ON" -e "WITH_DOC=ON" paddledev/paddle:dev