From dd86b40058af85d887842ca79cea370fd55a34b1 Mon Sep 17 00:00:00 2001 From: tianshuo78520a <707759223@qq.com> Date: Wed, 8 May 2019 10:05:23 +0800 Subject: [PATCH] document_preview (#17166) * document_preview * change name * document * add document_preview.sh * add document_preview.sh * add paddle_build.sh * nohup python * change port runserver * test doc * test=develop * test=develop * test=develop * add git clone FluidDoc,PaddlePaddle.org * change PaddlePaddle.org * Add port comment * change directory * change PADDLE_ROOT --- paddle/scripts/paddle_build.sh | 11 +++++++++++ tools/document_preview.sh | 13 +++++++++++++ 2 files changed, 24 insertions(+) create mode 100755 tools/document_preview.sh diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 51093d859f2..f1630e0b509 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -931,6 +931,12 @@ EOF ./clean.sh } + +function build_document_preview() { + sh /paddle/tools/document_preview.sh ${PORT} +} + + function main() { local CMD=$1 local parallel_number=$2 @@ -1025,6 +1031,11 @@ function main() { test_fluid_lib) test_fluid_lib ;; + document) + cmake_gen ${PYTHON_ABI:-""} + build ${parallel_number} + build_document_preview + ;; *) print_usage exit 1 diff --git a/tools/document_preview.sh b/tools/document_preview.sh new file mode 100755 index 00000000000..d0e9b3178a6 --- /dev/null +++ b/tools/document_preview.sh @@ -0,0 +1,13 @@ +#!/bin/bash +PADDLE_ROOT=/paddle +cd ${PADDLE_ROOT} +git clone https://github.com/PaddlePaddle/FluidDoc +git clone https://github.com/tianshuo78520a/PaddlePaddle.org.git +sh ${PADDLE_ROOT}/FluidDoc/doc/fluid/api/gen_doc.sh +pip install ${PADDLE_ROOT}/build/opt/paddle/share/wheels/*.whl +apt-get update && apt-get install -y python-dev build-essential +cd ${PADDLE_ROOT}/PaddlePaddle.org/portal +pip install -r requirements.txt +#If the default port is not occupied, you can use port 8000, you need to replace it with a random port on the CI. +sed -i "s#8000#$1#g" runserver +nohup ./runserver --paddle ${PADDLE_ROOT}/FluidDoc & -- GitLab