Steps to recreate:
nvidia-docker run --rm nvcr.io/nvidia/pytorch:19.05-py3 python3 -c "import tensorrt"
Traceback (most recent call last):
File “”, line 1, in
ModuleNotFoundError: No module named ‘tensorrt’
Other potentially useful info:
nvidia-docker run --rm nvcr.io/nvidia/pytorch:19.05-py3 nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Thu_Apr_18_19:10:59_PDT_2019
Cuda compilation tools, release 10.1, V10.1.163
nvidia-docker run --rm nvcr.io/nvidia/pytorch:19.05-py3 nvidia-smi
Sun Jun 9 06:05:01 2019
±----------------------------------------------------------------------------+
| NVIDIA-SMI 418.67 Driver Version: 418.67 CUDA Version: 10.1 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce RTX 208… On | 00000000:01:00.0 Off | N/A |
| 0% 37C P0 65W / 260W | 105MiB / 10989MiB | 2% Default |
±------------------------------±---------------------±---------------------+
| 1 GeForce RTX 208… On | 00000000:02:00.0 Off | N/A |
| 0% 35C P8 19W / 260W | 1MiB / 10989MiB | 0% Default |
±------------------------------±---------------------±---------------------+
±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
±----------------------------------------------------------------------------+
I can confirm the TensorRT samples (only checked sampleMNIST) work. I installed samples via nv-tensorrt-repo-ubuntu1804-cuda10.1-trt5.1.5.0-ga-20190427_1-1_amd64.deb.
Also:
dpkg -l | grep libnvinfer
ii libnvinfer-dev 5.1.5-1+cuda10.1 amd64 TensorRT development libraries and headers
ii libnvinfer-samples 5.1.5-1+cuda10.1 all TensorRT samples and documentation
ii libnvinfer5 5.1.5-1+cuda10.1 amd64 TensorRT runtime libraries