Skip to content

Commit b3c6cd0

Browse files
authored
Merge branch 'release/0.10.0' into curl_is_also_need_by_paddle
2 parents 5f41d28 + dba0672 commit b3c6cd0

File tree

4 files changed

+25
-9
lines changed

4 files changed

+25
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
*.DS_Store
22
build/
3+
build_doc/
34
*.user
45

56
.vscode

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ARG WITH_DOC
1313
ARG WITH_STYLE_CHECK
1414

1515
ENV WOBOQ OFF
16-
ENV WITH_GPU=${WITH_AVX:-OFF}
16+
ENV WITH_GPU=${WITH_GPU:-OFF}
1717
ENV WITH_AVX=${WITH_AVX:-ON}
1818
ENV WITH_DOC=${WITH_DOC:-OFF}
1919
ENV WITH_STYLE_CHECK=${WITH_STYLE_CHECK:-OFF}
@@ -27,7 +27,7 @@ RUN apt-get update && \
2727
apt-get install -y wget unzip tar xz-utils bzip2 gzip coreutils && \
2828
apt-get install -y curl sed grep graphviz libjpeg-dev zlib1g-dev && \
2929
apt-get install -y python-numpy python-matplotlib gcc g++ gfortran && \
30-
apt-get install -y automake locales clang-format-3.8 swig && \
30+
apt-get install -y automake locales clang-format-3.8 swig doxygen && \
3131
apt-get clean -y
3232

3333
# git credential to skip password typing

paddle/scripts/docker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ docker build -t paddle:dev --build-arg UBUNTU_MIRROR=mirror://mirrors.ubuntu.com
9494
Given the development image `paddle:dev`, the following command builds PaddlePaddle from the source tree on the development computer (host):
9595

9696
```bash
97-
docker run --rm -v $PWD:/paddle -e "WITH_GPU=OFF" -e "WITH_AVX=ON" -e "WITH_TEST=OFF" -e "RUN_TEST=OFF" paddle:dev
97+
docker run --rm -v $PWD:/paddle -e "WITH_GPU=OFF" -e "WITH_AVX=ON" -e "WITH_TESTING=OFF" -e "RUN_TEST=OFF" paddle:dev
9898
```
9999

100100
This command mounts the source directory on the host into `/paddle` in the container, so the default entry point of `paddle:dev`, `build.sh`, could build the source code with possible local changes. When it writes to `/paddle/build` in the container, it writes to `$PWD/build` on the host indeed.

paddle/scripts/docker/build.sh

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,36 @@ rm *.deb 2>/dev/null || true
2929

3030
cmake .. \
3131
-DCMAKE_BUILD_TYPE=Release \
32-
-DWITH_DOC=${WITH_DOC:-OFF} \
32+
-DWITH_DOC=OFF \
3333
-DWITH_GPU=${WITH_GPU:-OFF} \
3434
-DWITH_AVX=${WITH_AVX:-OFF} \
3535
-DWITH_SWIG_PY=ON \
3636
-DCUDNN_ROOT=/usr/ \
3737
-DWITH_STYLE_CHECK=${WITH_STYLE_CHECK:-OFF} \
38-
-DON_COVERALLS=${WITH_TEST:-OFF} \
38+
-DWITH_TESTING=${WITH_TESTING:-OFF} \
3939
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
4040
make -j `nproc`
41-
if [[ ${RUN_TEST:-OFF} == "ON" ]]; then
42-
make coveralls
41+
if [ ${WITH_TESTING:-OFF} == "ON" ] && [ ${RUN_TEST:-OFF} == "ON" ] ; then
42+
make test
4343
fi
4444
make install
45-
45+
pip install /usr/local/opt/paddle/share/wheels/*.whl
46+
47+
# To build documentation, we need to run cmake twice.
48+
# This awkwardness is due to https://github.com/PaddlePaddle/Paddle/issues/1854.
49+
# It also describes a solution.
50+
if [ ${WITH_DOC} == "ON" ]; then
51+
mkdir -p /paddle/build_doc
52+
pushd /paddle/build_doc
53+
cmake .. \
54+
-DWITH_DOC=ON \
55+
-DWITH_GPU=OFF \
56+
-DWITH_AVX=${WITH_AVX:-OFF} \
57+
-DWITH_SWIG_PY=ON \
58+
-DWITH_STYLE_CHECK=OFF
59+
make paddle_docs paddle_docs_cn
60+
popd
61+
fi
4662
# generate deb package for current build
4763
cpack -D CPACK_GENERATOR='DEB' ..
4864

@@ -110,7 +126,6 @@ RUN apt-get update &&\
110126
dpkg -i /*.deb ; apt-get install -f -y && \
111127
apt-get clean -y && \
112128
rm -f /*.deb && \
113-
pip install /usr/opt/paddle/share/wheels/*.whl && \
114129
paddle version
115130
${CPU_DOCKER_PYTHON_HOME_ENV}
116131
${DOCKERFILE_CUDNN_DSO}

0 commit comments

Comments
 (0)