NVIDIA / tensorflow

An Open Source Machine Learning Framework for Everyone
https://developer.nvidia.com/deep-learning-frameworks
Apache License 2.0
962 stars 144 forks source link

cannot install via wheels on nvidia/cuda #86

Closed bertsky closed 1 year ago

bertsky commented 1 year ago

System information

Describe the problem

In trying to find a suitable Docker base image supporting nvidia-tensorflow 1.15, I tried two versions of nvidia/cuda:

(I cannot just use nvidia/tensorflow images, because I also need to ship Pytorch and others in my image.)

They both complain:

ERROR: Could not find a version that satisfies the requirement tensorrt~=8.5 (from nvidia-tensorflow) (from versions: 0.0.1.dev5, 0.0.1)
ERROR: No matching distribution found for tensorrt~=8.5 (from nvidia-tensorflow)

Provide the exact sequence of commands / steps that you executed before running into the problem

docker run --gpus all --rm -it nvcr.io/nvidia/cuda:12.0.1-cudnn8-runtime-ubuntu20.04 bash # or nvidia/cuda:11.3.1-cudnn8-runtime-ubuntu20.04
apt-get update
apt-get install python3-pip
pip install nvidia-pyindex
pip install nvidia-tensorflow

Any other info / logs

I also tried to satisfy the tensorrt requirement via apt:

apt-get install tensorrt-dev

But because libcudnn8 and libnccl2 are marked as held packages, that will complain

The following packages have unmet dependencies:
 tensorrt-dev : Depends: libnvinfer-dev (= 8.6.0.12-1+cuda12.0) but it is not going to be installed
                Depends: libnvinfer-plugin-dev (= 8.6.0.12-1+cuda12.0) but it is not going to be installed
                Depends: libnvparsers-dev (= 8.6.0.12-1+cuda12.0) but it is not going to be installed
                Depends: libnvonnxparsers-dev (= 8.6.0.12-1+cuda12.0) but it is not going to be installed
nluehr commented 1 year ago

Try updating pip.

python3 -mpip install --upgrade pip
bertsky commented 1 year ago

python3 -m pip install --upgrade pip

wow, that did help!

I usually test this first, but in this case I turns out I also confused the system provided /usr/lib/python3/dist-packages/pip (v20) with the new one under /usr/local/lib/python3.8/dist-packages/pip (v23). After a hash -r, it did use the right version.

Much obliged!