TensorRT icon indicating copy to clipboard operation
TensorRT copied to clipboard

Dockerfile ubuntu 18.04 build failed

Open xoiga123 opened this issue 3 years ago • 2 comments

Description

ubuntu-18.04.Dockerfile fails to build, probably something to do with apt-get install -y software-properties-common installing python 3.6 by default, then the subsequent steps require python 3.10.

Environment

TensorRT Version: None NVIDIA GPU: GTX 1660 Super NVIDIA Driver Version: 510 CUDA Version: None CUDNN Version: None Operating System: Ubuntu 18.04 Python Version (if applicable): Tensorflow Version (if applicable): PyTorch Version (if applicable): Baremetal or Container (if so, version): Container 18.04

Relevant Files

Steps To Reproduce

bash docker/build.sh --file docker/ubuntu-18.04.Dockerfile --tag tensorrt-ubuntu18.04

Relevant docker build traces:

Step 13/32 : RUN apt-get update && apt-get install -y software-properties-common
The following additional packages will be installed:
  cron dbus distro-info-data file gir1.2-glib-2.0 iso-codes libapparmor1
  libapt-inst2.0 libdbus-1-3 libexpat1 libgirepository-1.0-1 libglib2.0-0
  libglib2.0-data libicu60 libmagic-mgc libmagic1 libmpdec2 libpython3-stdlib
  libpython3.6-minimal libpython3.6-stdlib libxml2 lsb-release mime-support
  powermgmt-base python-apt-common python3 python3-apt python3-dbus python3-gi
  python3-minimal python3-software-properties python3.6 python3.6-minimal
  shared-mime-info ucf unattended-upgrades xdg-user-dirs
...
Step 16/32 : RUN apt-get install -y --no-install-recommends       python3       python3-pip       python3-dev       python3-wheel &&    cd /usr/local/bin &&    ln -s /usr/bin/python3 python &&    ln -s /usr/bin/pip3 pip;
python3 is already the newest version (3.6.7-1~18.04).
python3 set to manually installed.
The following additional packages will be installed:
  dh-python libexpat1-dev libpython3-dev libpython3.6 libpython3.6-dev
  python-pip-whl python3-distutils python3-lib2to3 python3.6-dev
...
Step 21/32 : RUN pip3 install -r /tmp/requirements.txt
Ignoring onnx: markers 'python_version == "3.10"' don't match your environment
Ignoring onnxruntime: markers 'python_version == "3.10"' don't match your environment
Ignoring torch: markers 'python_version == "3.10"' don't match your environment
Ignoring torchvision: markers 'python_version == "3.10"' don't match your environment
Collecting onnx==1.10.2
  Downloading onnx-1.10.2-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (12.7 MB)
ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==2.9.1 (from versions: 0.12.1, 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.4.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.9.0, 1.10.0, 1.10.1, 1.11.0, 1.12.0, 1.12.2, 1.12.3, 1.13.1, 1.13.2, 1.14.0, 1.15.0, 1.15.2, 1.15.3, 1.15.4, 1.15.5, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.5.0, 2.5.1, 2.5.2, 2.6.0, 2.6.1, 2.6.2)
ERROR: No matching distribution found for tensorflow-gpu==2.9.1
The command '/bin/bash -c pip3 install -r /tmp/requirements.txt' returned a non-zero code: 1

xoiga123 avatar Sep 06 '22 07:09 xoiga123

Okay just found out it was not requiring python 3.10 exactly, but this line in requirements.txt onnx==1.10.2; python_version<"3.10" requires tensorflow-gpu==2.9.1 which in turn requires python >= 3.7

So maybe this just broke with how onnx handles their dependency, but is there a way for us to fix it here? I had to manually install python 3.8 and pip3.8 the last few commands in Dockerfile

xoiga123 avatar Sep 07 '22 04:09 xoiga123

@rajeevsrao ^ ^

zerollzeng avatar Sep 07 '22 15:09 zerollzeng

Cannot repro in the latest commit, close and thanks!

ttyio avatar Mar 01 '23 08:03 ttyio