diff --git a/paddle/scripts/docker/cpu-demo/Dockerfile b/paddle/scripts/docker/cpu-demo/Dockerfile index fa71494e4d7a3694c050dfc08e6c0af793a25496..b2291203829d25ec2d021410eded365262caa016 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 3083afbe4813eaf5d20c2f8855516e41bfe24fd6..1f74e1f1af22ab7531c0ad546d9e734d0b4b2541 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 114f61f24fa39f0ca75f3a31161464da7cd41877..1bfa202d0c574035ddc20d91a18103a9930b9e90 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 3083afbe4813eaf5d20c2f8855516e41bfe24fd6..1f74e1f1af22ab7531c0ad546d9e734d0b4b2541 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 738df37251cbbe3ceb933e4a24c2cb4e40c83b4c..119154200a135f204ddd572fb21069c5712af913 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 3083afbe4813eaf5d20c2f8855516e41bfe24fd6..1f74e1f1af22ab7531c0ad546d9e734d0b4b2541 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 6e32117e92250e9859c0e30c8c80622e2181f65a..f3b8cd568db6072548e3e6db23648c4d76bfe006 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 3083afbe4813eaf5d20c2f8855516e41bfe24fd6..1f74e1f1af22ab7531c0ad546d9e734d0b4b2541 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 2e34d96e152315cae3a5c464e9b92cb52ff3f317..2e600f34d03ed05c038b6ccd8d93bccb1a8a92f7 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 3083afbe4813eaf5d20c2f8855516e41bfe24fd6..1f74e1f1af22ab7531c0ad546d9e734d0b4b2541 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 2dd678d55ab3e532bdb3bdf40ab9c36198374d17..62d6f1f98769b57f9ac6a87eaf4d058eae79e2c5 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 3083afbe4813eaf5d20c2f8855516e41bfe24fd6..1f74e1f1af22ab7531c0ad546d9e734d0b4b2541 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 ~