提交 35e0f970 编写于 作者: Y Yancey1989

update

上级 587a05e5
...@@ -7,13 +7,13 @@ ARG UBUNTU_MIRROR ...@@ -7,13 +7,13 @@ ARG UBUNTU_MIRROR
RUN /bin/bash -c 'if [[ -n ${UBUNTU_MIRROR} ]]; then sed -i 's#http://archive.ubuntu.com/ubuntu#${UBUNTU_MIRROR}#g' /etc/apt/sources.list; fi' RUN /bin/bash -c 'if [[ -n ${UBUNTU_MIRROR} ]]; then sed -i 's#http://archive.ubuntu.com/ubuntu#${UBUNTU_MIRROR}#g' /etc/apt/sources.list; fi'
# ENV variables # ENV variables
ARG BUILD_WOBOQ ARG WOBOQ
ARG WITH_GPU ARG WITH_GPU
ARG WITH_AVX ARG WITH_AVX
ARG WITH_DOC ARG WITH_DOC
ARG WITH_STYLE_CHECK ARG WITH_STYLE_CHECK
ENV BUILD_WOBOQ=${BUILD_WOBOQ:-OFF} ENV WOBOQ=${WOBOQ:-OFF}
ENV WITH_GPU=${WITH_AVX:-OFF} ENV WITH_GPU=${WITH_AVX:-OFF}
ENV WITH_AVX=${WITH_AVX:-ON} ENV WITH_AVX=${WITH_AVX:-ON}
ENV WITH_DOC=${WITH_DOC:-OFF} ENV WITH_DOC=${WITH_DOC:-OFF}
...@@ -48,7 +48,7 @@ RUN curl -sSL https://cmake.org/files/v3.4/cmake-3.4.1.tar.gz | tar -xz && \ ...@@ -48,7 +48,7 @@ RUN curl -sSL https://cmake.org/files/v3.4/cmake-3.4.1.tar.gz | tar -xz && \
cd cmake-3.4.1 && ./bootstrap && make -j `nproc` && make install && \ cd cmake-3.4.1 && ./bootstrap && make -j `nproc` && make install && \
cd .. && rm -rf cmake-3.4.1 cd .. && rm -rf cmake-3.4.1
VOLUME ["/usr/share/nginx/html/data", "/usr/share/nginx/html/paddle"] VOLUME ["/woboq_out"]
# Configure OpenSSH server. c.f. https://docs.docker.com/engine/examples/running_ssh_service # Configure OpenSSH server. c.f. https://docs.docker.com/engine/examples/running_ssh_service
RUN mkdir /var/run/sshd RUN mkdir /var/run/sshd
......
...@@ -168,15 +168,17 @@ kubectl ... ...@@ -168,15 +168,17 @@ kubectl ...
``` ```
### Reading source code with woboq codebrowser ### Reading source code with woboq codebrowser
If you are interesting of PaddlePaddle source code, [Woboq codebrowser](https://github.com/woboq/woboq_codebrowser) is a suitable tool. For developers who are interested in the C++ source code, please use -e "WOBOQ=ON" to enable building C++ source code into HTML pages using [Woboq codebrowser](https://github.com/woboq/woboq_codebrowser).
- Build PaddlePaddle source code to be static files
- The following command will generate woboq HTML pages in a docker volume directory, `$HOME/nginx` directory will be created on your local disk when the build finishes.
```bash ```bash
docker run -v $PWD:/paddle -v $HOME/nginx_data:/usr/share/nginx/html/data -v $HOME/nginx_data/paddle:/usr/share/nginx/html/paddle -e "WITH_GPU=OFF" -e "WITH_AVX=ON" -e "WITH_TEST=OFF" -e "RUN_TEST=OFF" -e "BUILD_WOBOQ=ON" paddle:dev docker run -v $PWD:/paddle -v $HOME/nginx:/woboq_out -e "WITH_GPU=OFF" -e "WITH_AVX=ON"
-e "WITH_TEST=ON" -e "WOBOQ=ON" paddle:dev
``` ```
- Open the generated static files in a browser, or upload these files to your web server. You can run nginx server as the following command, and then hit "http://<hostip>:8080/paddle" in browser. - Open the generated static files in a browser, or upload these files to your web server. You can run nginx server as the following command, and then hit "http://<hostip>:8080/paddle" in browser.
``` ```
docker run -v $HOME/nginx_data:/usr/share/nginx/html -d -p 8080:80 nginx docker run -v $HOME/nginx:/usr/share/nginx/html -d -p 8080:80 nginx
``` ```
...@@ -47,7 +47,7 @@ make install ...@@ -47,7 +47,7 @@ make install
# install them in docker # install them in docker
cpack -D CPACK_GENERATOR='DEB' -D CPACK_DEBIAN_PACKAGE_DEPENDS="" .. cpack -D CPACK_GENERATOR='DEB' -D CPACK_DEBIAN_PACKAGE_DEPENDS="" ..
if [[ ${BUILD_WOBOQ:-OFF} == 'ON' ]]; then if [[ ${WOBOQ:-OFF} == 'ON' ]]; then
apt-get install -y clang-3.8 llvm-3.8 libclang-3.8-dev apt-get install -y clang-3.8 llvm-3.8 libclang-3.8-dev
# Install woboq_codebrowser. # Install woboq_codebrowser.
git clone https://github.com/woboq/woboq_codebrowser /woboq git clone https://github.com/woboq/woboq_codebrowser /woboq
...@@ -58,6 +58,7 @@ if [[ ${BUILD_WOBOQ:-OFF} == 'ON' ]]; then ...@@ -58,6 +58,7 @@ if [[ ${BUILD_WOBOQ:-OFF} == 'ON' ]]; then
make make
export WOBOQ_OUT=/usr/share/nginx/html/paddle export WOBOQ_OUT=/usr/share/nginx/html/paddle
export WOBOQ_OUT=/woboq_out/paddle
export BUILD_DIR=/paddle/build export BUILD_DIR=/paddle/build
mkdir -p $WOBOQ_OUT mkdir -p $WOBOQ_OUT
cp -rv /woboq/data $WOBOQ_OUT/../data cp -rv /woboq/data $WOBOQ_OUT/../data
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册