glenn-jocher
commited on
Commit
•
b3eaf50
1
Parent(s):
9b13a59
TensorRT pip install
Browse files- tutorial.ipynb +5 -11
tutorial.ipynb
CHANGED
@@ -1090,19 +1090,13 @@
|
|
1090 |
},
|
1091 |
"source": [
|
1092 |
"# TensorRT \n",
|
1093 |
-
"# https://
|
1094 |
-
"!
|
1095 |
-
"
|
1096 |
-
"!
|
1097 |
-
"![ -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",
|
1098 |
-
"%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",
|
1099 |
-
"%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",
|
1100 |
-
"\n",
|
1101 |
-
"!python export.py --weights yolov5s.pt --include engine --imgsz 640 640 --device 0\n",
|
1102 |
-
"!python detect.py --weights yolov5s.engine --imgsz 640 640 --device 0"
|
1103 |
],
|
1104 |
"execution_count": null,
|
1105 |
"outputs": []
|
1106 |
}
|
1107 |
]
|
1108 |
-
}
|
|
|
1090 |
},
|
1091 |
"source": [
|
1092 |
"# TensorRT \n",
|
1093 |
+
"# https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html#installing-pip\n",
|
1094 |
+
"!pip install -U nvidia-tensorrt --index-url https://pypi.ngc.nvidia.com # install\n",
|
1095 |
+
"!python export.py --weights yolov5s.pt --include engine --imgsz 640 640 --device 0 # export\n",
|
1096 |
+
"!python detect.py --weights yolov5s.engine --imgsz 640 640 --device 0 # inference"
|
|
|
|
|
|
|
|
|
|
|
|
|
1097 |
],
|
1098 |
"execution_count": null,
|
1099 |
"outputs": []
|
1100 |
}
|
1101 |
]
|
1102 |
+
}
|