mmdetection-tenserrt

안준모·2023년 10월 10일

계속 실패를 했는데, 어쨌든 기록을 해보겠다.
참고: https://github.com/grimoire/mmdetection-to-tensorrt/blob/master/README.md

혹시 모르니 가상환경을 하나 복사해서 해본다.
컨테이너를 새로 만들어서 해보니, 안된다.
원래 잘되던 컨테이너에서 해본다.

다음 순서대로 해본다.

1. 먼저, mmdetection 텐서RT설치

git clone https://github.com/grimoire/mmdetection-to-tensorrt.git
cd mmdetection-to-tensorrt
python setup.py develop

2. 토치텐서도 설치해야된다.

git clone https://github.com/grimoire/torch2trt_dynamic.git torch2trt_dynamic
cd torch2trt_dynamic
python setup.py develop

3. 텐서RT 도 설치한다

git clone --depth=1 https://github.com/grimoire/amirstan_plugin.git
cd amirstan_plugin
git submodule update --init --progress --depth=1
mkdir build
cd build
cmake -DTENSORRT_DIR=${TENSORRT_DIR} ..
make -j10

4. cmake 버전 업그레이드

그런데, cmake 버전에러가 발생했다. 높은버전설치
~~
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
CMake 3.14 or higher is required. You are running version 3.10.2
-- Configuring incomplete, errors occurred!
~~

참고: https://somjang.tistory.com/entry/Ubuntu-CMake-%EC%97%85%EB%8D%B0%EC%9D%B4%ED%8A%B8-%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95
참고: https://jeha.tistory.com/32

wget https://cmake.org/files/v3.23/cmake-3.23.1.tar.gz
tar -xvf cmake-3.23.1.tar.gz
cd cmake-3.23.1
./bootstrap
sudo apt-get install libssl-dev (openSSL 에러발생시)
./bootstrap (다시실행)
make
make install
export PATH=HOME/cmakeinstall/bin:HOME/cmake-install/bin:PATH
export CMAKE_PREFIX_PATH=HOME/cmakeinstall:HOME/cmake-install:CMAKE_PREFIX_PATH
source ~/.bashrc

cmake --version (설치 버전 확인)

cmake -DTENSORRT_DIR=/root/project/mmdetection-to-tensorrt/mmdet2trt ..

profile
MLops 에 관심이 많습니다.

0개의 댓글