提交 f9a5a2c0 编写于 作者: Q qijun

follow comments

上级 aa7d7e62
......@@ -57,7 +57,13 @@ if [ ${WITH_DOC} == "ON" ]; then
-DWITH_SWIG_PY=ON \
-DWITH_STYLE_CHECK=OFF
make paddle_docs paddle_docs_cn
$DOC_DIR=/paddle/paddle/scripts/tools/build_docs/
mkdir -p $DOC_DIR/doc
mkdir -p $DOC_DIR/doc_cn
cp -r /paddle/build_doc/doc/doc/en/html/* $DOC_DIR/doc
cp -r /paddle/build_doc/doc/cn/html/* $DOC_DIR/doc_cn
popd
rm -rf /paddle/build_doc
fi
# generate deb package for current build
# FIXME(typhoonzero): should we remove paddle/scripts/deb ?
......
#!/bin/bash
set -e
docker run --rm -v $PWD:/paddle -e "WITH_GPU=OFF" -e "WITH_AVX=ON" -e "WITH_DOC=ON" paddledev/paddle:dev
function usage(){
echo "usage: build_doc [--help] [<args>]"
echo "This script generates doc and doc_cn in the script's directory."
echo "These are common commands used in various situations:"
echo " with_docker build doc and doc_cn with docker"
echo " local build doc and doc_cn locally"
}
MYDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PADDLE_SOURCE_DIR=$MYDIR/../../../../
case "$1" in
"with_docker")
docker run --rm -v $PADDLE_SOURCE_DIR:/paddle \
-e "WITH_GPU=OFF" -e "WITH_AVX=ON" -e "WITH_DOC=ON" paddledev/paddle:dev
;;
"local")
mkdir -p $MYDIR/doc
mkdir -p $MYDIR/doc_cn
mkdir -p $PADDLE_SOURCE_DIR/build_doc
pushd $PADDLE_SOURCE_DIR/build_doc
cmake .. -DWITH_DOC=ON
make paddle_docs paddle_docs_cn
cp -r $PADDLE_SOURCE_DIR/build_doc/doc/en/html/* $MYDIR/doc
cp -r $PADDLE_SOURCE_DIR/build_doc/doc/cn/html/* $MYDIR/doc_cn
popd
rm -rf $PADDLE_SOURCE_DIR/build_doc
;;
"--help")
usage
;;
*)
usage
;;
esac
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册