From 76b71d1068dea496b5a16923b60a6e5c3098f4d3 Mon Sep 17 00:00:00 2001 From: yuyang18 Date: Wed, 31 Aug 2016 02:34:54 +0000 Subject: [PATCH] Add missing file for last commit ISSUE=4600307 git-svn-id: https://svn.baidu.com/idl/trunk/paddle@1439 1ad973e4-5ce8-4261-8a94-b56d1f490c56 --- paddle/scripts/docker/cpu-demo/Dockerfile | 1 + paddle/scripts/docker/cpu-demo/build.sh | 13 +++++++++---- paddle/scripts/docker/cpu-devel/Dockerfile | 1 + paddle/scripts/docker/cpu-devel/build.sh | 13 +++++++++---- paddle/scripts/docker/cpu/Dockerfile | 1 + paddle/scripts/docker/cpu/build.sh | 13 +++++++++---- paddle/scripts/docker/gpu-demo/Dockerfile | 1 + paddle/scripts/docker/gpu-demo/build.sh | 13 +++++++++---- paddle/scripts/docker/gpu-devel/Dockerfile | 1 + paddle/scripts/docker/gpu-devel/build.sh | 13 +++++++++---- paddle/scripts/docker/gpu/Dockerfile | 1 + paddle/scripts/docker/gpu/build.sh | 13 +++++++++---- 12 files changed, 60 insertions(+), 24 deletions(-) diff --git a/paddle/scripts/docker/cpu-demo/Dockerfile b/paddle/scripts/docker/cpu-demo/Dockerfile index fa71494e4d..b229120382 100644 --- a/paddle/scripts/docker/cpu-demo/Dockerfile +++ b/paddle/scripts/docker/cpu-demo/Dockerfile @@ -6,4 +6,5 @@ ENV IS_DEVEL=ON ENV WITH_DEMO=ON ENV PIP_INSTALL_ARGS "" ENV PIP_GENERAL_ARGS "" +ENV USE_UBUNTU_MIRROR OFF RUN cd /root/ && bash build.sh diff --git a/paddle/scripts/docker/cpu-demo/build.sh b/paddle/scripts/docker/cpu-demo/build.sh index 3083afbe48..1f74e1f1af 100644 --- a/paddle/scripts/docker/cpu-demo/build.sh +++ b/paddle/scripts/docker/cpu-demo/build.sh @@ -7,7 +7,10 @@ function abort(){ trap 'abort' 0 set -e -sed -i 's#http://archive\.ubuntu\.com/ubuntu/#mirror://mirrors\.ubuntu\.com/mirrors\.txt#g' /etc/apt/sources.list +if [ ${USE_UBUNTU_MIRROR} == "ON" ]; then + sed -i 's#http://archive\.ubuntu\.com/ubuntu/#mirror://mirrors\.ubuntu\.com/mirrors\.txt#g'\ + /etc/apt/sources.list +fi apt-get update apt-get install -y cmake libprotobuf-dev protobuf-compiler git \ libgoogle-glog-dev libgflags-dev libatlas-dev libatlas3-base g++ m4 python-pip\ @@ -22,7 +25,8 @@ git clone https://github.com/baidu/Paddle.git paddle cd paddle mkdir build cd build -cmake .. -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU} -DWITH_SWIG_PY=ON -DCUDNN_ROOT=/usr/ +cmake .. -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU} -DWITH_SWIG_PY=ON\ + -DCUDNN_ROOT=/usr/ -DWITH_STYLE_CHECK=OFF make -j `nproc` # because durning make install, there are several warning, so set +e, do not cause abort make install @@ -32,8 +36,9 @@ paddle version # print version after build if [ ${WITH_DEMO} == "ON" ]; then apt-get install -y wget unzip perl python-matplotlib tar xz-utils bzip2 gzip coreutils\ - sed grep graphviz - pip ${PIP_GENERAL_ARGS} install ${PIP_INSTALL_ARGS} BeautifulSoup docopt PyYAML + sed grep graphviz libjpeg-dev zlib1g-dev + pip ${PIP_GENERAL_ARGS} install ${PIP_INSTALL_ARGS} BeautifulSoup docopt \ + PyYAML pillow fi if [ ${IS_DEVEL} == "OFF" ]; then # clean build packages. cd ~ diff --git a/paddle/scripts/docker/cpu-devel/Dockerfile b/paddle/scripts/docker/cpu-devel/Dockerfile index 114f61f24f..1bfa202d0c 100644 --- a/paddle/scripts/docker/cpu-devel/Dockerfile +++ b/paddle/scripts/docker/cpu-devel/Dockerfile @@ -6,4 +6,5 @@ ENV IS_DEVEL=ON ENV WITH_DEMO=OFF ENV PIP_INSTALL_ARGS "" ENV PIP_GENERAL_ARGS "" +ENV USE_UBUNTU_MIRROR OFF RUN cd /root/ && bash build.sh diff --git a/paddle/scripts/docker/cpu-devel/build.sh b/paddle/scripts/docker/cpu-devel/build.sh index 3083afbe48..1f74e1f1af 100644 --- a/paddle/scripts/docker/cpu-devel/build.sh +++ b/paddle/scripts/docker/cpu-devel/build.sh @@ -7,7 +7,10 @@ function abort(){ trap 'abort' 0 set -e -sed -i 's#http://archive\.ubuntu\.com/ubuntu/#mirror://mirrors\.ubuntu\.com/mirrors\.txt#g' /etc/apt/sources.list +if [ ${USE_UBUNTU_MIRROR} == "ON" ]; then + sed -i 's#http://archive\.ubuntu\.com/ubuntu/#mirror://mirrors\.ubuntu\.com/mirrors\.txt#g'\ + /etc/apt/sources.list +fi apt-get update apt-get install -y cmake libprotobuf-dev protobuf-compiler git \ libgoogle-glog-dev libgflags-dev libatlas-dev libatlas3-base g++ m4 python-pip\ @@ -22,7 +25,8 @@ git clone https://github.com/baidu/Paddle.git paddle cd paddle mkdir build cd build -cmake .. -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU} -DWITH_SWIG_PY=ON -DCUDNN_ROOT=/usr/ +cmake .. -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU} -DWITH_SWIG_PY=ON\ + -DCUDNN_ROOT=/usr/ -DWITH_STYLE_CHECK=OFF make -j `nproc` # because durning make install, there are several warning, so set +e, do not cause abort make install @@ -32,8 +36,9 @@ paddle version # print version after build if [ ${WITH_DEMO} == "ON" ]; then apt-get install -y wget unzip perl python-matplotlib tar xz-utils bzip2 gzip coreutils\ - sed grep graphviz - pip ${PIP_GENERAL_ARGS} install ${PIP_INSTALL_ARGS} BeautifulSoup docopt PyYAML + sed grep graphviz libjpeg-dev zlib1g-dev + pip ${PIP_GENERAL_ARGS} install ${PIP_INSTALL_ARGS} BeautifulSoup docopt \ + PyYAML pillow fi if [ ${IS_DEVEL} == "OFF" ]; then # clean build packages. cd ~ diff --git a/paddle/scripts/docker/cpu/Dockerfile b/paddle/scripts/docker/cpu/Dockerfile index 738df37251..119154200a 100644 --- a/paddle/scripts/docker/cpu/Dockerfile +++ b/paddle/scripts/docker/cpu/Dockerfile @@ -6,4 +6,5 @@ ENV IS_DEVEL=OFF ENV WITH_DEMO=OFF ENV PIP_INSTALL_ARGS "" ENV PIP_GENERAL_ARGS "" +ENV USE_UBUNTU_MIRROR OFF RUN cd /root/ && bash build.sh diff --git a/paddle/scripts/docker/cpu/build.sh b/paddle/scripts/docker/cpu/build.sh index 3083afbe48..1f74e1f1af 100644 --- a/paddle/scripts/docker/cpu/build.sh +++ b/paddle/scripts/docker/cpu/build.sh @@ -7,7 +7,10 @@ function abort(){ trap 'abort' 0 set -e -sed -i 's#http://archive\.ubuntu\.com/ubuntu/#mirror://mirrors\.ubuntu\.com/mirrors\.txt#g' /etc/apt/sources.list +if [ ${USE_UBUNTU_MIRROR} == "ON" ]; then + sed -i 's#http://archive\.ubuntu\.com/ubuntu/#mirror://mirrors\.ubuntu\.com/mirrors\.txt#g'\ + /etc/apt/sources.list +fi apt-get update apt-get install -y cmake libprotobuf-dev protobuf-compiler git \ libgoogle-glog-dev libgflags-dev libatlas-dev libatlas3-base g++ m4 python-pip\ @@ -22,7 +25,8 @@ git clone https://github.com/baidu/Paddle.git paddle cd paddle mkdir build cd build -cmake .. -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU} -DWITH_SWIG_PY=ON -DCUDNN_ROOT=/usr/ +cmake .. -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU} -DWITH_SWIG_PY=ON\ + -DCUDNN_ROOT=/usr/ -DWITH_STYLE_CHECK=OFF make -j `nproc` # because durning make install, there are several warning, so set +e, do not cause abort make install @@ -32,8 +36,9 @@ paddle version # print version after build if [ ${WITH_DEMO} == "ON" ]; then apt-get install -y wget unzip perl python-matplotlib tar xz-utils bzip2 gzip coreutils\ - sed grep graphviz - pip ${PIP_GENERAL_ARGS} install ${PIP_INSTALL_ARGS} BeautifulSoup docopt PyYAML + sed grep graphviz libjpeg-dev zlib1g-dev + pip ${PIP_GENERAL_ARGS} install ${PIP_INSTALL_ARGS} BeautifulSoup docopt \ + PyYAML pillow fi if [ ${IS_DEVEL} == "OFF" ]; then # clean build packages. cd ~ diff --git a/paddle/scripts/docker/gpu-demo/Dockerfile b/paddle/scripts/docker/gpu-demo/Dockerfile index 6e32117e92..f3b8cd568d 100644 --- a/paddle/scripts/docker/gpu-demo/Dockerfile +++ b/paddle/scripts/docker/gpu-demo/Dockerfile @@ -6,4 +6,5 @@ ENV IS_DEVEL=ON ENV WITH_DEMO=ON ENV PIP_INSTALL_ARGS "" ENV PIP_GENERAL_ARGS "" +ENV USE_UBUNTU_MIRROR OFF RUN cd /root/ && bash build.sh diff --git a/paddle/scripts/docker/gpu-demo/build.sh b/paddle/scripts/docker/gpu-demo/build.sh index 3083afbe48..1f74e1f1af 100644 --- a/paddle/scripts/docker/gpu-demo/build.sh +++ b/paddle/scripts/docker/gpu-demo/build.sh @@ -7,7 +7,10 @@ function abort(){ trap 'abort' 0 set -e -sed -i 's#http://archive\.ubuntu\.com/ubuntu/#mirror://mirrors\.ubuntu\.com/mirrors\.txt#g' /etc/apt/sources.list +if [ ${USE_UBUNTU_MIRROR} == "ON" ]; then + sed -i 's#http://archive\.ubuntu\.com/ubuntu/#mirror://mirrors\.ubuntu\.com/mirrors\.txt#g'\ + /etc/apt/sources.list +fi apt-get update apt-get install -y cmake libprotobuf-dev protobuf-compiler git \ libgoogle-glog-dev libgflags-dev libatlas-dev libatlas3-base g++ m4 python-pip\ @@ -22,7 +25,8 @@ git clone https://github.com/baidu/Paddle.git paddle cd paddle mkdir build cd build -cmake .. -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU} -DWITH_SWIG_PY=ON -DCUDNN_ROOT=/usr/ +cmake .. -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU} -DWITH_SWIG_PY=ON\ + -DCUDNN_ROOT=/usr/ -DWITH_STYLE_CHECK=OFF make -j `nproc` # because durning make install, there are several warning, so set +e, do not cause abort make install @@ -32,8 +36,9 @@ paddle version # print version after build if [ ${WITH_DEMO} == "ON" ]; then apt-get install -y wget unzip perl python-matplotlib tar xz-utils bzip2 gzip coreutils\ - sed grep graphviz - pip ${PIP_GENERAL_ARGS} install ${PIP_INSTALL_ARGS} BeautifulSoup docopt PyYAML + sed grep graphviz libjpeg-dev zlib1g-dev + pip ${PIP_GENERAL_ARGS} install ${PIP_INSTALL_ARGS} BeautifulSoup docopt \ + PyYAML pillow fi if [ ${IS_DEVEL} == "OFF" ]; then # clean build packages. cd ~ diff --git a/paddle/scripts/docker/gpu-devel/Dockerfile b/paddle/scripts/docker/gpu-devel/Dockerfile index 2e34d96e15..2e600f34d0 100644 --- a/paddle/scripts/docker/gpu-devel/Dockerfile +++ b/paddle/scripts/docker/gpu-devel/Dockerfile @@ -6,4 +6,5 @@ ENV IS_DEVEL=ON ENV WITH_DEMO=OFF ENV PIP_INSTALL_ARGS "" ENV PIP_GENERAL_ARGS "" +ENV USE_UBUNTU_MIRROR OFF RUN cd /root/ && bash build.sh diff --git a/paddle/scripts/docker/gpu-devel/build.sh b/paddle/scripts/docker/gpu-devel/build.sh index 3083afbe48..1f74e1f1af 100644 --- a/paddle/scripts/docker/gpu-devel/build.sh +++ b/paddle/scripts/docker/gpu-devel/build.sh @@ -7,7 +7,10 @@ function abort(){ trap 'abort' 0 set -e -sed -i 's#http://archive\.ubuntu\.com/ubuntu/#mirror://mirrors\.ubuntu\.com/mirrors\.txt#g' /etc/apt/sources.list +if [ ${USE_UBUNTU_MIRROR} == "ON" ]; then + sed -i 's#http://archive\.ubuntu\.com/ubuntu/#mirror://mirrors\.ubuntu\.com/mirrors\.txt#g'\ + /etc/apt/sources.list +fi apt-get update apt-get install -y cmake libprotobuf-dev protobuf-compiler git \ libgoogle-glog-dev libgflags-dev libatlas-dev libatlas3-base g++ m4 python-pip\ @@ -22,7 +25,8 @@ git clone https://github.com/baidu/Paddle.git paddle cd paddle mkdir build cd build -cmake .. -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU} -DWITH_SWIG_PY=ON -DCUDNN_ROOT=/usr/ +cmake .. -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU} -DWITH_SWIG_PY=ON\ + -DCUDNN_ROOT=/usr/ -DWITH_STYLE_CHECK=OFF make -j `nproc` # because durning make install, there are several warning, so set +e, do not cause abort make install @@ -32,8 +36,9 @@ paddle version # print version after build if [ ${WITH_DEMO} == "ON" ]; then apt-get install -y wget unzip perl python-matplotlib tar xz-utils bzip2 gzip coreutils\ - sed grep graphviz - pip ${PIP_GENERAL_ARGS} install ${PIP_INSTALL_ARGS} BeautifulSoup docopt PyYAML + sed grep graphviz libjpeg-dev zlib1g-dev + pip ${PIP_GENERAL_ARGS} install ${PIP_INSTALL_ARGS} BeautifulSoup docopt \ + PyYAML pillow fi if [ ${IS_DEVEL} == "OFF" ]; then # clean build packages. cd ~ diff --git a/paddle/scripts/docker/gpu/Dockerfile b/paddle/scripts/docker/gpu/Dockerfile index 2dd678d55a..62d6f1f987 100644 --- a/paddle/scripts/docker/gpu/Dockerfile +++ b/paddle/scripts/docker/gpu/Dockerfile @@ -6,4 +6,5 @@ ENV IS_DEVEL=OFF ENV WITH_DEMO=OFF ENV PIP_INSTALL_ARGS "" ENV PIP_GENERAL_ARGS "" +ENV USE_UBUNTU_MIRROR OFF RUN cd /root/ && bash build.sh diff --git a/paddle/scripts/docker/gpu/build.sh b/paddle/scripts/docker/gpu/build.sh index 3083afbe48..1f74e1f1af 100644 --- a/paddle/scripts/docker/gpu/build.sh +++ b/paddle/scripts/docker/gpu/build.sh @@ -7,7 +7,10 @@ function abort(){ trap 'abort' 0 set -e -sed -i 's#http://archive\.ubuntu\.com/ubuntu/#mirror://mirrors\.ubuntu\.com/mirrors\.txt#g' /etc/apt/sources.list +if [ ${USE_UBUNTU_MIRROR} == "ON" ]; then + sed -i 's#http://archive\.ubuntu\.com/ubuntu/#mirror://mirrors\.ubuntu\.com/mirrors\.txt#g'\ + /etc/apt/sources.list +fi apt-get update apt-get install -y cmake libprotobuf-dev protobuf-compiler git \ libgoogle-glog-dev libgflags-dev libatlas-dev libatlas3-base g++ m4 python-pip\ @@ -22,7 +25,8 @@ git clone https://github.com/baidu/Paddle.git paddle cd paddle mkdir build cd build -cmake .. -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU} -DWITH_SWIG_PY=ON -DCUDNN_ROOT=/usr/ +cmake .. -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU} -DWITH_SWIG_PY=ON\ + -DCUDNN_ROOT=/usr/ -DWITH_STYLE_CHECK=OFF make -j `nproc` # because durning make install, there are several warning, so set +e, do not cause abort make install @@ -32,8 +36,9 @@ paddle version # print version after build if [ ${WITH_DEMO} == "ON" ]; then apt-get install -y wget unzip perl python-matplotlib tar xz-utils bzip2 gzip coreutils\ - sed grep graphviz - pip ${PIP_GENERAL_ARGS} install ${PIP_INSTALL_ARGS} BeautifulSoup docopt PyYAML + sed grep graphviz libjpeg-dev zlib1g-dev + pip ${PIP_GENERAL_ARGS} install ${PIP_INSTALL_ARGS} BeautifulSoup docopt \ + PyYAML pillow fi if [ ${IS_DEVEL} == "OFF" ]; then # clean build packages. cd ~ -- GitLab