Based on TensorRT | NVIDIA NGC, I am trying to use the TensorRT NGC container. However, I cannot get the Python dependencies installed due to import errors.
Procedure:
docker run --gpus all -it --rm nvcr.io/nvidia/tensorrt:19.09-py3
within the Docker container, run as instructed:
/opt/tensorrt/python/python_setup.sh
Results (only error pasted):
Setting up uff-converter-tf (6.0.1-1+cuda10.1) ...
Traceback (most recent call last):
File "/usr/lib/python3.6/dist-packages/uff/converters/tensorflow/conversion_helpers.py", line 18, in <module>
from tensorflow import GraphDef
ImportError: cannot import name 'GraphDef'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.6/dist-packages/uff/__init__.py", line 2, in <module>
from uff.converters.tensorflow.conversion_helpers import from_tensorflow # noqa
File "/usr/lib/python3.6/dist-packages/uff/converters/tensorflow/conversion_helpers.py", line 23, in <module>
https://www.tensorflow.org/install/""".format(err))
ImportError: ERROR: Failed to import module (cannot import name 'GraphDef')
It does work using tag 18.12-py3, although a warning is given that tf.GraphDef is deprecated, please use tf.compat.v1.GraphDef instead.