提交 b3eaf500 authored 作者: Glenn Jocher's avatar Glenn Jocher

TensorRT pip install

上级 9b13a594
...@@ -1090,19 +1090,13 @@ ...@@ -1090,19 +1090,13 @@
}, },
"source": [ "source": [
"# TensorRT \n", "# TensorRT \n",
"# https://developer.nvidia.com/nvidia-tensorrt-download\n", "# https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html#installing-pip\n",
"!lsb_release -a # check system\n", "!pip install -U nvidia-tensorrt --index-url https://pypi.ngc.nvidia.com # install\n",
"%ls /usr/local | grep cuda # check CUDA\n", "!python export.py --weights yolov5s.pt --include engine --imgsz 640 640 --device 0 # export\n",
"!wget https://ultralytics.com/assets/TensorRT-8.2.0.6.Linux.x86_64-gnu.cuda-11.4.cudnn8.2.tar.gz # download\n", "!python detect.py --weights yolov5s.engine --imgsz 640 640 --device 0 # inference"
"![ -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"
], ],
"execution_count": null, "execution_count": null,
"outputs": [] "outputs": []
} }
] ]
} }
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论