Установка TensorRT - проблема с библиотекой libnvinfer7 (Cuda 10.2) в ubuntu 18.04 - PullRequest
5 голосов
/ 28 мая 2020

Я пытался установить tenorRT 7.0 в ubuntu 18.4 (nv-tensorrt-repo-ubuntu1804-cuda10.2-trt7.0.0.11-ga-20191216_1-1_amd64.deb) debian.

документация https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html#installing -debian .

Я получаю следующую ошибку с libnvinfer7. Искал это вокруг pl anet, не смог найти, потерял время и сон. Пожалуйста, помогите мне с этим:

 amarnath@amarnath-Precision-T3610:/opt/pixuate$ sudo apt install tensorrt
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
     tensorrt : Depends: libnvinfer7 (= 7.0.0-1+cuda10.2) but it is not going to be installed
                Depends: libnvinfer-plugin7 (= 7.0.0-1+cuda10.2) but it is not going to be installed
                Depends: libnvparsers7 (= 7.0.0-1+cuda10.2) but it is not going to be installed
                Depends: libnvonnxparsers7 (= 7.0.0-1+cuda10.2) but it is not going to be installed
                Depends: libnvinfer-bin (= 7.0.0-1+cuda10.2) but it is not going to be installed
                Depends: libnvinfer-dev (= 7.0.0-1+cuda10.2) but it is not going to be installed
                Depends: libnvinfer-plugin-dev (= 7.0.0-1+cuda10.2) but it is not going to be installed
                Depends: libnvparsers-dev (= 7.0.0-1+cuda10.2) but it is not going to be installed
                Depends: libnvonnxparsers-dev (= 7.0.0-1+cuda10.2) but it is not going to be installed
                Depends: libnvinfer-samples (= 7.0.0-1+cuda10.2) but it is not going to be installed
                Depends: libnvinfer-doc (= 7.0.0-1+cuda10.2) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

Ну, попробовал «sudo apt-get install python3 -libnvinfer-dev»

amarnath@amarnath-Precision-T3610:/opt/pixuate$ sudo apt-get install python3-libnvinfer-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-libnvinfer-dev : Depends: python3-libnvinfer (= 7.0.0-1+cuda10.2) but it is not going to be installed
                          Depends: libnvinfer-dev (= 7.0.0-1+cuda10.2) but it is not going to be installed
                          Depends: libnvinfer-plugin-dev (= 7.0.0-1+cuda10.2) but it is not going to be installed
                          Depends: libnvparsers-dev (= 7.0.0-1+cuda10.2) but it is not going to be installed
                          Depends: libnvonnxparsers-dev (= 7.0.0-1+cuda10.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

1 Ответ

2 голосов
/ 04 июня 2020

В разделе установки TensorRT из https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html есть это предложение:

требует, чтобы CUDA Toolkit и cuDNN также были установлены с использованием пакетов Debian или RPM

Если вы устанавливаете инструментарий CUDA и cuDNN с использованием файлов deb, должна быть устранена ошибка неудовлетворенных зависимостей .

ПРИМЕЧАНИЕ: Перед установкой проверьте версии Ubuntu, CUDA и cuDNN, которые вы хотите установить. В приведенных ниже советах по установке использовались CUDA 10.2 и cuDNN 7.6.5. Это протестировано для TensorRT 7.0.0.

CUDA .deb install

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804x86_64cuda-ubuntu1804.pin  
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb
sudo apt-key add /var/cuda-repo-10-2-local-10.2.89-440.33.01/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda

CUDNN .deb install

Сначала загрузите файлы .deb:

  1. Библиотека разработчика cuDNN для Ubuntu18.04 (Deb)
  2. Библиотека времени выполнения cuDNN для Ubuntu18.04 (Deb)

После этого установите загруженные пакеты:

sudo dpkg -i libcudnn7_7.6.5.32-1+cuda10.2_amd64.deb
sudo dpkg -i libcudnn7-dev_7.6.5.32-1+cuda10.2_amd64.deb

ПРИМЕЧАНИЕ: Эти инструкции по установке взяты с официальных веб-сайтов nvidia

...