TensorRT pip install
This commit is contained in:
parent
9b13a594e9
commit
b3eaf5008b
|
|
@ -1090,16 +1090,10 @@
|
|||
},
|
||||
"source": [
|
||||
"# TensorRT \n",
|
||||
"# https://developer.nvidia.com/nvidia-tensorrt-download\n",
|
||||
"!lsb_release -a # check system\n",
|
||||
"%ls /usr/local | grep cuda # check CUDA\n",
|
||||
"!wget https://ultralytics.com/assets/TensorRT-8.2.0.6.Linux.x86_64-gnu.cuda-11.4.cudnn8.2.tar.gz # download\n",
|
||||
"![ -d /content/TensorRT-8.2.0.6/ ] || tar -C /content/ -zxf ./TensorRT-8.2.0.6.Linux.x86_64-gnu.cuda-11.4.cudnn8.2.tar.gz # unzip\n",
|
||||
"%pip list | grep tensorrt || pip install /content/TensorRT-8.2.0.6/python/tensorrt-8.2.0.6-cp37-none-linux_x86_64.whl # install\n",
|
||||
"%env LD_LIBRARY_PATH=/usr/local/cuda-11.1/lib64:/content/cuda-11.1/lib64:/content/TensorRT-8.2.0.6/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64 # add to path\n",
|
||||
"\n",
|
||||
"!python export.py --weights yolov5s.pt --include engine --imgsz 640 640 --device 0\n",
|
||||
"!python detect.py --weights yolov5s.engine --imgsz 640 640 --device 0"
|
||||
"# https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html#installing-pip\n",
|
||||
"!pip install -U nvidia-tensorrt --index-url https://pypi.ngc.nvidia.com # install\n",
|
||||
"!python export.py --weights yolov5s.pt --include engine --imgsz 640 640 --device 0 # export\n",
|
||||
"!python detect.py --weights yolov5s.engine --imgsz 640 640 --device 0 # inference"
|
||||
],
|
||||
"execution_count": null,
|
||||
"outputs": []
|
||||
|
|
|
|||
Loading…
Reference in New Issue