Skip to content

Commit

Permalink
Add noavx to docker
Browse files Browse the repository at this point in the history
  • Loading branch information
reyoung committed Sep 28, 2016
1 parent d130d18 commit 9749eb8
Show file tree
Hide file tree
Showing 27 changed files with 411 additions and 10 deletions.
1 change: 1 addition & 0 deletions paddle/scripts/docker/Dockerfile.m4
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ ENV WITH_DEMO=PADDLE_WITH_DEMO
ENV PIP_INSTALL_ARGS ""
ENV PIP_GENERAL_ARGS ""
ENV USE_UBUNTU_MIRROR OFF
ENV WITH_AVX=PADDLE_WITH_AVX
RUN cd /root/ && bash build.sh
2 changes: 1 addition & 1 deletion paddle/scripts/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cd paddle
mkdir build
cd build
cmake .. -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU} -DWITH_SWIG_PY=ON\
-DCUDNN_ROOT=/usr/ -DWITH_STYLE_CHECK=OFF
-DCUDNN_ROOT=/usr/ -DWITH_STYLE_CHECK=OFF -DWITH_AVX=${WITH_AVX}
make -j `nproc`
# because durning make install, there are several warning, so set +e, do not cause abort
make install
Expand Down
1 change: 1 addition & 0 deletions paddle/scripts/docker/cpu-demo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ ENV WITH_DEMO=ON
ENV PIP_INSTALL_ARGS ""
ENV PIP_GENERAL_ARGS ""
ENV USE_UBUNTU_MIRROR OFF
ENV WITH_AVX=ON
RUN cd /root/ && bash build.sh
2 changes: 1 addition & 1 deletion paddle/scripts/docker/cpu-demo/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cd paddle
mkdir build
cd build
cmake .. -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU} -DWITH_SWIG_PY=ON\
-DCUDNN_ROOT=/usr/ -DWITH_STYLE_CHECK=OFF
-DCUDNN_ROOT=/usr/ -DWITH_STYLE_CHECK=OFF -DWITH_AVX=${WITH_AVX}
make -j `nproc`
# because durning make install, there are several warning, so set +e, do not cause abort
make install
Expand Down
1 change: 1 addition & 0 deletions paddle/scripts/docker/cpu-devel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ ENV WITH_DEMO=OFF
ENV PIP_INSTALL_ARGS ""
ENV PIP_GENERAL_ARGS ""
ENV USE_UBUNTU_MIRROR OFF
ENV WITH_AVX=ON
RUN cd /root/ && bash build.sh
2 changes: 1 addition & 1 deletion paddle/scripts/docker/cpu-devel/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cd paddle
mkdir build
cd build
cmake .. -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU} -DWITH_SWIG_PY=ON\
-DCUDNN_ROOT=/usr/ -DWITH_STYLE_CHECK=OFF
-DCUDNN_ROOT=/usr/ -DWITH_STYLE_CHECK=OFF -DWITH_AVX=${WITH_AVX}
make -j `nproc`
# because durning make install, there are several warning, so set +e, do not cause abort
make install
Expand Down
11 changes: 11 additions & 0 deletions paddle/scripts/docker/cpu-noavx-demo/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM ubuntu:14.04
MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
COPY build.sh /root/
ENV WITH_GPU=OFF
ENV IS_DEVEL=ON
ENV WITH_DEMO=ON
ENV PIP_INSTALL_ARGS ""
ENV PIP_GENERAL_ARGS ""
ENV USE_UBUNTU_MIRROR OFF
ENV WITH_AVX=OFF
RUN cd /root/ && bash build.sh
48 changes: 48 additions & 0 deletions paddle/scripts/docker/cpu-noavx-demo/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash

function abort(){
echo "An error occurred. Exiting..." 1>&2
exit 1
}

trap 'abort' 0
set -e
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\
python-protobuf python-numpy python-dev swig

if [ ${WITH_GPU} == 'ON' ]; then
ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so /usr/lib/libcudnn.so
fi

cd ~
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/ -DWITH_STYLE_CHECK=OFF -DWITH_AVX=${WITH_AVX}
make -j `nproc`
# because durning make install, there are several warning, so set +e, do not cause abort
make install
echo 'export LD_LIBRARY_PATH=/usr/lib64:${LD_LIBRARY_PATH}' >> /etc/profile
pip ${PIP_GENERAL_ARGS} install ${PIP_INSTALL_ARGS} /usr/local/opt/paddle/share/wheels/*.whl
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 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 ~
rm -rf paddle
fi
apt-get clean -y
trap : 0
11 changes: 11 additions & 0 deletions paddle/scripts/docker/cpu-noavx-devel/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM ubuntu:14.04
MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
COPY build.sh /root/
ENV WITH_GPU=OFF
ENV IS_DEVEL=ON
ENV WITH_DEMO=OFF
ENV PIP_INSTALL_ARGS ""
ENV PIP_GENERAL_ARGS ""
ENV USE_UBUNTU_MIRROR OFF
ENV WITH_AVX=OFF
RUN cd /root/ && bash build.sh
48 changes: 48 additions & 0 deletions paddle/scripts/docker/cpu-noavx-devel/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash

function abort(){
echo "An error occurred. Exiting..." 1>&2
exit 1
}

trap 'abort' 0
set -e
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\
python-protobuf python-numpy python-dev swig

if [ ${WITH_GPU} == 'ON' ]; then
ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so /usr/lib/libcudnn.so
fi

cd ~
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/ -DWITH_STYLE_CHECK=OFF -DWITH_AVX=${WITH_AVX}
make -j `nproc`
# because durning make install, there are several warning, so set +e, do not cause abort
make install
echo 'export LD_LIBRARY_PATH=/usr/lib64:${LD_LIBRARY_PATH}' >> /etc/profile
pip ${PIP_GENERAL_ARGS} install ${PIP_INSTALL_ARGS} /usr/local/opt/paddle/share/wheels/*.whl
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 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 ~
rm -rf paddle
fi
apt-get clean -y
trap : 0
11 changes: 11 additions & 0 deletions paddle/scripts/docker/cpu-noavx/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM ubuntu:14.04
MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
COPY build.sh /root/
ENV WITH_GPU=OFF
ENV IS_DEVEL=OFF
ENV WITH_DEMO=OFF
ENV PIP_INSTALL_ARGS ""
ENV PIP_GENERAL_ARGS ""
ENV USE_UBUNTU_MIRROR OFF
ENV WITH_AVX=OFF
RUN cd /root/ && bash build.sh
48 changes: 48 additions & 0 deletions paddle/scripts/docker/cpu-noavx/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash

function abort(){
echo "An error occurred. Exiting..." 1>&2
exit 1
}

trap 'abort' 0
set -e
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\
python-protobuf python-numpy python-dev swig

if [ ${WITH_GPU} == 'ON' ]; then
ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so /usr/lib/libcudnn.so
fi

cd ~
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/ -DWITH_STYLE_CHECK=OFF -DWITH_AVX=${WITH_AVX}
make -j `nproc`
# because durning make install, there are several warning, so set +e, do not cause abort
make install
echo 'export LD_LIBRARY_PATH=/usr/lib64:${LD_LIBRARY_PATH}' >> /etc/profile
pip ${PIP_GENERAL_ARGS} install ${PIP_INSTALL_ARGS} /usr/local/opt/paddle/share/wheels/*.whl
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 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 ~
rm -rf paddle
fi
apt-get clean -y
trap : 0
1 change: 1 addition & 0 deletions paddle/scripts/docker/cpu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ ENV WITH_DEMO=OFF
ENV PIP_INSTALL_ARGS ""
ENV PIP_GENERAL_ARGS ""
ENV USE_UBUNTU_MIRROR OFF
ENV WITH_AVX=ON
RUN cd /root/ && bash build.sh
2 changes: 1 addition & 1 deletion paddle/scripts/docker/cpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cd paddle
mkdir build
cd build
cmake .. -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU} -DWITH_SWIG_PY=ON\
-DCUDNN_ROOT=/usr/ -DWITH_STYLE_CHECK=OFF
-DCUDNN_ROOT=/usr/ -DWITH_STYLE_CHECK=OFF -DWITH_AVX=${WITH_AVX}
make -j `nproc`
# because durning make install, there are several warning, so set +e, do not cause abort
make install
Expand Down
46 changes: 43 additions & 3 deletions paddle/scripts/docker/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,73 @@
set -e
cd `dirname $0`
m4 -DPADDLE_WITH_GPU=OFF -DPADDLE_IS_DEVEL=OFF -DPADDLE_WITH_DEMO=OFF \
-DPADDLE_BASE_IMAGE=ubuntu:14.04\
-DPADDLE_BASE_IMAGE=ubuntu:14.04 -DPADDLE_WITH_AVX=ON\
Dockerfile.m4 > cpu/Dockerfile
cp build.sh cpu/

m4 -DPADDLE_WITH_GPU=OFF -DPADDLE_IS_DEVEL=OFF -DPADDLE_WITH_DEMO=OFF \
-DPADDLE_BASE_IMAGE=ubuntu:14.04 -DPADDLE_WITH_AVX=OFF\
Dockerfile.m4 > cpu-noavx/Dockerfile
cp build.sh cpu-noavx/

m4 -DPADDLE_WITH_GPU=OFF -DPADDLE_IS_DEVEL=ON -DPADDLE_WITH_DEMO=OFF \
-DPADDLE_BASE_IMAGE=ubuntu:14.04\
-DPADDLE_BASE_IMAGE=ubuntu:14.04 -DPADDLE_WITH_AVX=OFF\
Dockerfile.m4 > cpu-noavx-devel/Dockerfile
cp build.sh cpu-noavx-devel/

m4 -DPADDLE_WITH_GPU=OFF -DPADDLE_IS_DEVEL=ON -DPADDLE_WITH_DEMO=OFF \
-DPADDLE_BASE_IMAGE=ubuntu:14.04 -DPADDLE_WITH_AVX=ON\
Dockerfile.m4 > cpu-devel/Dockerfile
cp build.sh cpu-devel/


m4 -DPADDLE_WITH_GPU=OFF -DPADDLE_IS_DEVEL=ON -DPADDLE_WITH_DEMO=ON \
-DPADDLE_BASE_IMAGE=ubuntu:14.04\
-DPADDLE_BASE_IMAGE=ubuntu:14.04 -DPADDLE_WITH_AVX=ON\
Dockerfile.m4 > cpu-demo/Dockerfile
cp build.sh cpu-demo/

m4 -DPADDLE_WITH_GPU=OFF -DPADDLE_IS_DEVEL=ON -DPADDLE_WITH_DEMO=ON \
-DPADDLE_BASE_IMAGE=ubuntu:14.04 -DPADDLE_WITH_AVX=OFF\
Dockerfile.m4 > cpu-noavx-demo/Dockerfile
cp build.sh cpu-noavx-demo/


m4 -DPADDLE_WITH_GPU=ON -DPADDLE_IS_DEVEL=OFF -DPADDLE_WITH_DEMO=OFF \
-DPADDLE_BASE_IMAGE=nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04 \
-DPADDLE_WITH_AVX=ON \
Dockerfile.m4 > gpu/Dockerfile
cp build.sh gpu/

m4 -DPADDLE_WITH_GPU=ON -DPADDLE_IS_DEVEL=OFF -DPADDLE_WITH_DEMO=OFF \
-DPADDLE_BASE_IMAGE=nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04 \
-DPADDLE_WITH_AVX=OFF \
Dockerfile.m4 > gpu-noavx/Dockerfile
cp build.sh gpu-noavx/


m4 -DPADDLE_WITH_GPU=ON -DPADDLE_IS_DEVEL=ON -DPADDLE_WITH_DEMO=OFF \
-DPADDLE_BASE_IMAGE=nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04 \
-DPADDLE_WITH_AVX=ON \
Dockerfile.m4 > gpu-devel/Dockerfile
cp build.sh gpu-devel/

m4 -DPADDLE_WITH_GPU=ON -DPADDLE_IS_DEVEL=ON -DPADDLE_WITH_DEMO=OFF \
-DPADDLE_BASE_IMAGE=nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04 \
-DPADDLE_WITH_AVX=OFF \
Dockerfile.m4 > gpu-noavx-devel/Dockerfile
cp build.sh gpu-noavx-devel/

m4 -DPADDLE_WITH_GPU=ON -DPADDLE_IS_DEVEL=ON -DPADDLE_WITH_DEMO=ON \
-DPADDLE_BASE_IMAGE=nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04 \
-DPADDLE_WITH_AVX=ON \
Dockerfile.m4 > gpu-demo/Dockerfile
cp build.sh gpu-demo/


m4 -DPADDLE_WITH_GPU=ON -DPADDLE_IS_DEVEL=ON -DPADDLE_WITH_DEMO=ON \
-DPADDLE_BASE_IMAGE=nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04 \
-DPADDLE_WITH_AVX=OFF \
Dockerfile.m4 > gpu-noavx-demo/Dockerfile
cp build.sh gpu-noavx-demo/


1 change: 1 addition & 0 deletions paddle/scripts/docker/gpu-demo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ ENV WITH_DEMO=ON
ENV PIP_INSTALL_ARGS ""
ENV PIP_GENERAL_ARGS ""
ENV USE_UBUNTU_MIRROR OFF
ENV WITH_AVX=ON
RUN cd /root/ && bash build.sh
2 changes: 1 addition & 1 deletion paddle/scripts/docker/gpu-demo/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cd paddle
mkdir build
cd build
cmake .. -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU} -DWITH_SWIG_PY=ON\
-DCUDNN_ROOT=/usr/ -DWITH_STYLE_CHECK=OFF
-DCUDNN_ROOT=/usr/ -DWITH_STYLE_CHECK=OFF -DWITH_AVX=${WITH_AVX}
make -j `nproc`
# because durning make install, there are several warning, so set +e, do not cause abort
make install
Expand Down
1 change: 1 addition & 0 deletions paddle/scripts/docker/gpu-devel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ ENV WITH_DEMO=OFF
ENV PIP_INSTALL_ARGS ""
ENV PIP_GENERAL_ARGS ""
ENV USE_UBUNTU_MIRROR OFF
ENV WITH_AVX=ON
RUN cd /root/ && bash build.sh
2 changes: 1 addition & 1 deletion paddle/scripts/docker/gpu-devel/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cd paddle
mkdir build
cd build
cmake .. -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU} -DWITH_SWIG_PY=ON\
-DCUDNN_ROOT=/usr/ -DWITH_STYLE_CHECK=OFF
-DCUDNN_ROOT=/usr/ -DWITH_STYLE_CHECK=OFF -DWITH_AVX=${WITH_AVX}
make -j `nproc`
# because durning make install, there are several warning, so set +e, do not cause abort
make install
Expand Down
11 changes: 11 additions & 0 deletions paddle/scripts/docker/gpu-noavx-demo/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04
MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
COPY build.sh /root/
ENV WITH_GPU=ON
ENV IS_DEVEL=ON
ENV WITH_DEMO=ON
ENV PIP_INSTALL_ARGS ""
ENV PIP_GENERAL_ARGS ""
ENV USE_UBUNTU_MIRROR OFF
ENV WITH_AVX=OFF
RUN cd /root/ && bash build.sh
Loading

0 comments on commit 9749eb8

Please sign in to comment.