build.sh 799 字节
Newer Older
M
MissPenguin 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
set -o errexit

if [ $# != 1 ] ; then
echo "USAGE: $0 MODE (one of ['det', 'rec', 'system'])"
echo " e.g.: $0 system"
exit 1;
fi

# MODE be one of ['det', 'rec', 'system']
MODE=$1
cp CMakeLists_$MODE.txt CMakeLists.txt


OPENCV_DIR=/paddle/git/new/PaddleOCR/deploy/cpp_infer/opencv-3.4.7/opencv3/
LIB_DIR=/paddle/git/new/PaddleOCR/deploy/cpp_infer/paddle_inference/
CUDA_LIB_DIR=/usr/local/cuda/lib64/
CUDNN_LIB_DIR=/usr/lib/x86_64-linux-gnu/

littletomatodonkey's avatar
littletomatodonkey 已提交
19 20 21 22 23 24 25 26 27 28

BUILD_DIR=build
rm -rf ${BUILD_DIR}
mkdir ${BUILD_DIR}
cd ${BUILD_DIR}
cmake .. \
    -DPADDLE_LIB=${LIB_DIR} \
    -DWITH_MKL=ON \
    -DWITH_GPU=OFF \
    -DWITH_STATIC_LIB=OFF \
L
LDOUBLEV 已提交
29
    -DWITH_TENSORRT=OFF \
littletomatodonkey's avatar
littletomatodonkey 已提交
30
    -DOPENCV_DIR=${OPENCV_DIR} \
littletomatodonkey's avatar
littletomatodonkey 已提交
31 32
    -DCUDNN_LIB=${CUDNN_LIB_DIR} \
    -DCUDA_LIB=${CUDA_LIB_DIR} \
L
LDOUBLEV 已提交
33
    -DTENSORRT_DIR=${TENSORRT_DIR} \
littletomatodonkey's avatar
littletomatodonkey 已提交
34 35

make -j