본문 바로가기

Programming/Python

[Python] TensorRT Installation(tar file)

반응형

1. TensorRT Download (Nvidia 계정 필요함)

https://developer.nvidia.com/tensorrt

 

NVIDIA TensorRT

An SDK with an optimizer for high-performance deep learning inference.

developer.nvidia.com

 

2. 다운로드 받은 디렉토리로 이동하여 압축 해제 및 설치할 디렉토리에 복사, 기본 설정

# tar xzvf TensorRT-8.4.3.1.Linux.x86_64-gnu.cuda-11.6.cudnn8.4.tar.gz

# # cd /usr/local
# sudo cp -rP /Download/TensorRT-8.4.3.1/ .

# sudo vi /etc/ld.so.conf.d/TensorRT.conf 
/usr/local/TensorRT-8.4.3.1/lib
저장

# sudo ldconfig

 

3. 사용자 계정으로 Python Library 설치

# cd /usr/local/TensorRT-8.4.3.1/python
# python3 -m pip install --user tensorrt-8.4.3.1-cp310-none-linux_x86_64.whl

# cd ../uff
# python3 -m pip install --user uff-0.6.9-py2.py3-none-any.whl

# which convert-to-uff

# cd ../graphsurgeon
# python3 -m pip install --user graphsurgeon-0.4.6-py2.py3-none-any.whl

# cd ../onnx_graphsurgeon
# python3 -m pip install --user onnx_graphsurgeon-0.3.12-py2.py3-none-any.whl

# python3 -m pip install --user --upgrade pyyaml requests tqdm
(samples 실행을 위한 Library)

 

 

### Uninstall 참고(user mode Libraty 유효) ###

# python3 -m pip uninstall tensorrt
# python3 -m pip uninstall uff
# python3 -m pip uninstall graphsurgeon
# python3 -m pip uninstall onnx-graphsurgeon

# \rm -rf /usr/local/TensorRT-8.4.3.1
# \rm /etc/ld.so.conf.d/TensorRT.conf

 

 

※ GPU Machine&Deep Learning을 위한 TensorFolw 설치 버전 조건이 생각보다 까다롭다..

    Nvidia Driver, CUDA Toolkit, cuDNN, TensorRT, TensorFlow 간 버전 조합에 대한 사전 확인 및 검증이 필요한 점 유의..

   기본적으로 CUDA Toolkit, cuDNN, TensorRT는 run SCRIPT 및 tar file로 수동 설치 하는게 시스템의 소프트웨어 업데이터 영향을 신경쓰지 않아도 될듯 싶음..(언인스톨 및 업그레이드는 다소 귀찮을 수 있음.. --)

 

 

참고: Installation Guide :: NVIDIA Deep Learning TensorRT Documentation

 

Installation Guide :: NVIDIA Deep Learning TensorRT Documentation

These upgrade instructions are for Ubuntu and Windows users only. When upgrading from TensorRT 8.0.x to TensorRT 8.4.x, ensure you are familiar with the following. About this task Using a Debian file The Debian packages are designed to upgrade your develop

docs.nvidia.com

https://testtube.tistory.com/39

 

[Ubuntu 18.04] Nvidia Driver & CUDA Toolkit & cuDNN Installation (ppa & apt-get, runfile, Tar file)

!!! Ubuntu 인스톨러 진입, 설치후 진입 등 OS 부팅 진입시 nouveau(Open Source Driver for Nvidia VGA) 호환 문제로 화면이 나오지 않거나 Hang 상태로 진행이 안될 경우 아래 참고 !!! https://testtube.tistory.com/7 [Cent

testtube.tistory.com

 

반응형