51 lines
1.2 KiB
Bash
Raw Normal View History

[Refactor] Rename mmdeploy_python to mmdeploy_runtime (#1911) * [Feature]: Add github prebuild workflow after new release. (#1852) * add prebuild dockerfile * add prebuild test workflw * update * update * rm other workflow for test * Update docker image * add win1o prebuild * add test prebuild * add windows scripts in prebuilt package * add linux scripts in prebuilt package * generate_build_config.py * fix cudnn search * fix env * fix script * fix rpath * fix cwd * fix windows * fix lint * windows prebuild ci * linux prebuild ci * fix * update trigger * Revert "rm other workflow for test" This reverts commit 0a0387275014efab71046d33a0e52904672b4012. * update sdk build readme * update prebuild * fix dll deps for python >= 3.8 on windows * fix ci * test prebuild * update test script to avoid modify upload folder * add onnxruntime.dll to mmdeploy_python * update prebuild workflow * update prebuild * Update loader.cpp.in * remove exists prebuild files * fix opencv env * update cmake options for mmdeploy python build * remove test code * fix lint --------- Co-authored-by: RunningLeon <mnsheng@yeah.net> Co-authored-by: RunningLeon <maningsheng@sensetime.com> * rename mmdeploy_python -> mmdeploy_runtime * test master prebuild * fix trt net build * Revert "test master prebuild" This reverts commit aad5258648f5f2c410c965b295c309fd1166da22. * add master branch * fix linux set_env script * update package_tools docs * fix gcc 7.3 aligned_alloc * comment temporarily as text_det_recog can't be built with prebuild package built under manylinux --------- Co-authored-by: RunningLeon <mnsheng@yeah.net> Co-authored-by: RunningLeon <maningsheng@sensetime.com>
2023-03-29 19:02:37 +08:00
#!/bin/bash
WORKSPACE=$(realpath $(dirname "$0"))
OPENCV_DIR=""
if [ -n "$1" ]; then
OPENCV_DIR=$(cd "$1"; pwd)
if [ $? -ne 0 ]; then
echo "opencv path $1 doesn't exist"
exit 1
fi
if [ ! -f "$OPENCV_DIR/OpenCVConfig.cmake" ]; then
echo "opencv path $1 doesn't contains OpenCVConfig.cmake"
exit 1
fi
fi
if [ -z "$OPENCV_DIR" ]; then
# search thirdparty
OPENCV_DIR="${WORKSPACE}/thirdparty/opencv/install/lib64/cmake/opencv4"
_OPENCV_DIR="${WORKSPACE}/thirdparty/opencv/install/lib/cmake/opencv4"
if [ -d "$OPENCV_DIR" ]; then
echo "Found OPENCV_DIR= $OPENCV_DIR"
elif [ -d "$_OPENCV_DIR" ]; then
OPENCV_DIR=$_OPENCV_DIR
echo "Found OPENCV_DIR= $OPENCV_DIR"
else
echo "Can't find opencv, please provide OPENCV_DIR or install it by install_opencv.sh"
exit 1
fi
fi
MMDEPLOY_DIR="$WORKSPACE/lib/cmake/MMDeploy"
BUILD_DIR="${WORKSPACE}/example/cpp/build"
if [ -d "${BUILD_DIR}" ]; then
rm -rf "${BUILD_DIR}"
fi
mkdir -p ${BUILD_DIR}
cd ${BUILD_DIR}
cmake .. -DMMDeploy_DIR="$MMDEPLOY_DIR" \
-DOpenCV_DIR="${OPENCV_DIR}"
make -j $(nproc)
cd ${WORKSPACE}
ln -sf ${BUILD_DIR} bin