linux_build.sh 734 字节
Newer Older
1 2
OPENCV_URL=https://bj.bcebos.com/paddleseg/deps/opencv346gcc4.8contrib.tar.bz2
if [ ! -d "./deps/opencv346_with_contrib" ]; then
S
sjtubinlong 已提交
3 4 5
    mkdir -p deps
    cd deps
    wget -c ${OPENCV_URL}
6 7
    tar xvfj opencv346gcc4.8contrib.tar.bz2
    rm -rf opencv346gcc4.8contrib.tar.bz2
S
sjtubinlong 已提交
8 9 10 11
    cd ..
fi

WITH_GPU=OFF
12
PADDLE_DIR=/root/project/fluid_inference/
S
sjtubinlong 已提交
13 14
CUDA_LIB=/usr/local/cuda-10.0/lib64/
CUDNN_LIB=/usr/local/cuda-10.0/lib64/
15
OPENCV_DIR=$(pwd)/deps/opencv346_with_contrib/
S
sjtubinlong 已提交
16
echo ${OPENCV_DIR}
S
sjtubinlong 已提交
17 18 19 20 21 22 23 24 25 26 27 28 29 30

rm -rf build
mkdir -p build
cd build

cmake .. \
    -DWITH_GPU=${WITH_GPU} \
    -DPADDLE_DIR=${PADDLE_DIR} \
    -DCUDA_LIB=${CUDA_LIB} \
    -DCUDNN_LIB=${CUDNN_LIB} \
    -DOPENCV_DIR=${OPENCV_DIR} \
    -DWITH_STATIC_LIB=OFF
make clean
make -j12
31