build.sh 504 字节
Newer Older
Z
zhangjinchao01 已提交
1 2 3 4 5 6 7 8 9 10
#!/bin/bash

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

trap 'abort' 0
set -e

Y
yuyang18 已提交
11 12
if [ ${WITH_GPU} == 'ON' ]; then
  ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so /usr/lib/libcudnn.so
Z
zhangjinchao01 已提交
13
fi
Y
yuyang18 已提交
14

15 16 17 18 19 20 21 22 23
mkdir -p /paddle/build # -p means no error if exists
cd /paddle/build
cmake .. \
      -DWITH_DOC=ON \
      -DWITH_GPU=${WITH_GPU} \
      -DWITH_AVX=${WITH_AVX} \
      -DWITH_SWIG_PY=ON \
      -DCUDNN_ROOT=/usr/ \
      -DWITH_STYLE_CHECK=OFF
Z
zhangjinchao01 已提交
24 25 26 27
make -j `nproc`
make install

trap : 0