Skip to content

Commit dd86b40

Browse files
tianshuo78520aluotao1
authored andcommitted
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
1 parent 91784f8 commit dd86b40

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

paddle/scripts/paddle_build.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -931,6 +931,12 @@ EOF
931931
./clean.sh
932932
}
933933

934+
935+
function build_document_preview() {
936+
sh /paddle/tools/document_preview.sh ${PORT}
937+
}
938+
939+
934940
function main() {
935941
local CMD=$1
936942
local parallel_number=$2
@@ -1025,6 +1031,11 @@ function main() {
10251031
test_fluid_lib)
10261032
test_fluid_lib
10271033
;;
1034+
document)
1035+
cmake_gen ${PYTHON_ABI:-""}
1036+
build ${parallel_number}
1037+
build_document_preview
1038+
;;
10281039
*)
10291040
print_usage
10301041
exit 1

tools/document_preview.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
PADDLE_ROOT=/paddle
3+
cd ${PADDLE_ROOT}
4+
git clone https://github.com/PaddlePaddle/FluidDoc
5+
git clone https://github.com/tianshuo78520a/PaddlePaddle.org.git
6+
sh ${PADDLE_ROOT}/FluidDoc/doc/fluid/api/gen_doc.sh
7+
pip install ${PADDLE_ROOT}/build/opt/paddle/share/wheels/*.whl
8+
apt-get update && apt-get install -y python-dev build-essential
9+
cd ${PADDLE_ROOT}/PaddlePaddle.org/portal
10+
pip install -r requirements.txt
11+
#If the default port is not occupied, you can use port 8000, you need to replace it with a random port on the CI.
12+
sed -i "s#8000#$1#g" runserver
13+
nohup ./runserver --paddle ${PADDLE_ROOT}/FluidDoc &

0 commit comments

Comments
 (0)