microsoft / microsoft/onnxruntime
[Build] Dockerfile.tensorrt out of date
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 184
Description
### Describe the issue
The docker file for TensorRT is out of date. Could we update the docker file with cuda 11.8 and tensorrt 10?
```
> [5/5] RUN git clone --single-branch --branch ${ONNXRUNTIME_BRANCH} --recursive ${ONNXRUNTIME_REPO} onnxruntime && /bin/sh onnxruntime/dockerfiles/scripts/install_common_deps.sh && trt_version=${TRT_VERSION:0:3} && /bin/sh onnxruntime/dockerfiles/scripts/checkout_submodules.sh ${trt_version} && cd onnxruntime && /bin/sh build.sh --allow_running_as_root --parallel --build_shared_lib --cuda_home /usr/local/cuda --cudnn_home /usr/lib/x86_64-linux-gnu/ --use_tensorrt --tensorrt_home /usr/lib/x86_64-linux-gnu/ --config Release --build_wheel --skip_tests --skip_submodule_sync --cmake_extra_defines '"CMAKE_CUDA_ARCHITECTURES='${CMAKE_CUDA_ARCHITECTURES}'"' && pip install /code/onnxruntime/build/Linux/Release/dist/*.whl && cd ..:
0.256 Cloning into 'onnxruntime'...
Updating files: 100% (8683/8683), done.
25.80 Submodule 'cmake/external/emsdk' (https://github.com/emscripten-core/emsdk.git) registered for path 'cmake/external/emsdk'
25.80 Submodule 'cmake/external/libprotobuf-mutator' (https://github.com/google/libprotobuf-mutator.git) registered for path 'cmake/external/libprotobuf-mutator'
25.80 Submodule 'cmake/external/onnx' (https://github.com/onnx/onnx.git) registered for path 'cmake/external/onnx'
25.80 Cloning into '/code/onnxruntime/cmake/external/emsdk'...
26.34 Cloning into '/code/onnxruntime/cmake/external/libprotobuf-mutator'...
26.66 Cloning into '/code/onnxruntime/cmake/external/onnx'...
30.36 Submodule path 'cmake/external/emsdk': checked out 'd52c46520124845b1e0e0525f2759299d840143f'
30.40 Submodule path 'cmake/external/libprotobuf-mutator': checked out '7a2ed51a6b682a83e345ff49fc4cfd7ca47550db'
30.87 Submodule path 'cmake/external/onnx': checked out '990217f043af7222348ca8f0301e17fa7b841781'
30.88 Submodule 'third_party/benchmark' (https://github.com/google/benchmark.git) registered for path 'cmake/external/onnx/third_party/benchmark'
30.88 Submodule 'third_party/pybind11' (https://github.com/pybind/pybind11.git) registered for path 'cmake/external/onnx/third_party/pybind11'
30.88 Cloning into '/code/onnxruntime/cmake/external/onnx/third_party/benchmark'...
31.59 Cloning into '/code/onnxruntime/cmake/external/onnx/third_party/pybind11'...
32.84 Submodule path 'cmake/external/onnx/third_party/benchmark': checked out '2dd015dfef425c866d9a43f2c67d8b52d709acb6'
32.90 Submodule path 'cmake/external/onnx/third_party/pybind11': checked out '5b0a6fc2017fcc176545afe3e09c9f9885283242'
33.15 Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
33.22 Hit:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease
33.29 Hit:3 http://security.ubuntu.com/ubuntu focal-security InRelease
33.29 Hit:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
33.51 Reading package lists...
34.42 Reading package lists...
35.30 Building dependency tree...
35.47 Reading state information...
35.61 build-essential is already the newest version (12.8ubuntu1.1).
35.61 ca-certificates is already the newest version (20230311ubuntu0.20.04.1).
35.61 curl is already the newest version (7.68.0-1ubuntu2.22).
35.61 libssl-dev is already the newest version (1.1.1f-1ubuntu2.22).
35.61 wget is already the newest version (1.20.3-1ubuntu2).
35.61 The following additional packages will be installed:
35.61 libpython3-dev
35.61 Suggested packages:
35.61 libcurl4-doc libidn11-dev libkrb5-dev libldap2-dev librtmp-dev libssh2-1-dev
35.61 pkg-config
35.63 The following NEW packages will be installed:
35.63 libcurl4-openssl-dev libpython3-dev python3-dev zip
36.40 0 upgraded, 4 newly installed, 0 to remove and 11 not upgraded.
36.40 Need to get 498 kB of archives.
36.40 After this operation, 2244 kB of additional disk space will be used.
36.40 Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libcurl4-openssl-dev amd64 7.68.0-1ubuntu2.22 [322 kB]
37.33 Get:2 http://archive.ubuntu.com/ubuntu focal/main amd64 libpython3-dev amd64 3.8.2-0ubuntu2 [7236 B]
37.33 Get:3 http://archive.ubuntu.com/ubuntu focal/main amd64 python3-dev amd64 3.8.2-0ubuntu2 [1212 B]
37.33 Get:4 http://archive.ubuntu.com/ubuntu focal/main amd64 zip amd64 3.0-11build1 [167 kB]
37.59 debconf: unable to initialize frontend: Dialog
37.59 debconf: (TERM is not set, so the dialog frontend is not usable.)
37.59 debconf: falling back to frontend: Readline
37.61 debconf: unable to initialize frontend: Readline
37.61 debconf: (This frontend requires a controlling tty.)
37.61 debconf: falling back to frontend: Teletype
37.62 dpkg-preconfigure: unable to re-open stdin:
37.65 Fetched 498 kB in 2s (273 kB/s)
37.67 Selecting previously unselected package libcurl4-openssl-dev:amd64.
(Reading database ... 24341 files and directories currently installed.)
37.68 Preparing to unpack .../libcurl4-openssl-dev_7.68.0-1ubuntu2.22_amd64.deb ...
37.69 Unpacking libcurl4-openssl-dev:amd64 (7.68.0-1ubuntu2.22) ...
37.76 Selecting previously unselected package libpython3-dev:amd64.
37.76 Preparing to unpack .../libpython3-dev_3.8.2-0ubuntu2_amd64.deb ...
37.77 Unpacking libpython3-dev:amd64 (3.8.2-0ubuntu2) ...
37.81 Selecting previously unselected package python3-dev.
37.81 Preparing to unpack .../python3-dev_3.8.2-0ubuntu2_amd64.deb ...
37.82 Unpacking python3-dev (3.8.2-0ubuntu2) ...
37.86 Selecting previously unselected package zip.
37.86 Preparing to unpack .../zip_3.0-11build1_amd64.deb ...
37.87 Unpacking zip (3.0-11build1) ...
37.93 Setting up libpython3-dev:amd64 (3.8.2-0ubuntu2) ...
37.95 Setting up zip (3.0-11build1) ...
37.97 Setting up libcurl4-openssl-dev:amd64 (7.68.0-1ubuntu2.22) ...
37.99 Setting up python3-dev (3.8.2-0ubuntu2) ...
38.37 PREFIX=/opt/miniconda
38.84 installing: python-3.7.0-hc3d631a_0 ...
41.91 Python 3.7.0 (default, Jun 28 2018, 13:15:42)
41.91 [GCC 7.2.0]
41.91 installing: ca-certificates-2018.03.07-0 ...
41.95 installing: conda-env-2.6.0-1 ...
41.98 installing: libgcc-ng-8.2.0-hdf63c60_1 ...
42.85 installing: libstdcxx-ng-8.2.0-hdf63c60_1 ...
43.21 installing: libffi-3.2.1-hd88cf55_4 ...
43.24 installing: ncurses-6.1-hf484d3e_0 ...
43.67 installing: openssl-1.0.2p-h14c3975_0 ...
44.26 installing: xz-5.2.4-h14c3975_4 ...
44.34 installing: yaml-0.1.7-had09818_2 ...
44.39 installing: zlib-1.2.11-ha838bed_2 ...
44.43 installing: libedit-3.1.20170329-h6b74fdf_2 ...
44.49 installing: readline-7.0-h7b6447c_5 ...
44.57 installing: tk-8.6.8-hbc83047_0 ...
44.98 installing: sqlite-3.24.0-h84994c4_0 ...
45.21 installing: asn1crypto-0.24.0-py37_0 ...
45.27 installing: certifi-2018.8.24-py37_1 ...
45.31 installing: chardet-3.0.4-py37_1 ...
45.37 installing: idna-2.7-py37_0 ...
45.42 installing: pycosat-0.6.3-py37h14c3975_0 ...
45.46 installing: pycparser-2.18-py37_1 ...
45.52 installing: pysocks-1.6.8-py37_0 ...
45.56 installing: ruamel_yaml-0.15.46-py37h14c3975_0 ...
45.63 installing: six-1.11.0-py37_1 ...
45.66 installing: cffi-1.11.5-py37he75722e_1 ...
45.72 installing: setuptools-40.2.0-py37_0 ...
45.84 installing: cryptography-2.3.1-py37hc365091_0 ...
45.97 installing: wheel-0.31.1-py37_0 ...
46.01 installing: pip-10.0.1-py37_0 ...
46.29 installing: pyopenssl-18.0.0-py37_0 ...
46.33 installing: urllib3-1.23-py37_0 ...
46.39 installing: requests-2.19.1-py37_0 ...
46.43 installing: conda-4.5.11-py37_0 ...
46.69 installation finished.
46.90 Cache location: /opt/miniconda/pkgs
46.90 Will remove the following tarballs:
46.90
46.90 /opt/miniconda/pkgs
46.90 -------------------
46.90 idna-2.7-py37_0.tar.bz2 99 KB
46.90 libstdcxx-ng-8.2.0-hdf63c60_1.tar.bz2 2.9 MB
46.90 requests-2.19.1-py37_0.tar.bz2 96 KB
46.90 sqlite-3.24.0-h84994c4_0.tar.bz2 1.8 MB
46.90 pycparser-2.18-py37_1.tar.bz2 167 KB
46.90 zlib-1.2.11-ha838bed_2.tar.bz2 101 KB
46.90 chardet-3.0.4-py37_1.tar.bz2 164 KB
46.90 conda-4.5.11-py37_0.tar.bz2 1.0 MB
46.90 libedit-3.1.20170329-h6b74fdf_2.tar.bz2 172 KB
46.90 yaml-0.1.7-had09818_2.tar.bz2 85 KB
46.90 xz-5.2.4-h14c3975_4.tar.bz2 366 KB
46.90 asn1crypto-0.24.0-py37_0.tar.bz2 154 KB
46.90 conda-env-2.6.0-1.tar.bz2 3 KB
46.90 setuptools-40.2.0-py37_0.tar.bz2 554 KB
46.90 readline-7.0-h7b6447c_5.tar.bz2 392 KB
46.90 pysocks-1.6.8-py37_0.tar.bz2 22 KB
46.90 pycosat-0.6.3-py37h14c3975_0.tar.bz2 105 KB
46.90 ncurses-6.1-hf484d3e_0.tar.bz2 943 KB
46.90 tk-8.6.8-hbc83047_0.tar.bz2 3.1 MB
46.90 openssl-1.0.2p-h14c3975_0.tar.bz2 3.5 MB
46.90 libgcc-ng-8.2.0-hdf63c60_1.tar.bz2 7.6 MB
46.90 ca-certificates-2018.03.07-0.tar.bz2 124 KB
46.90 ruamel_yaml-0.15.46-py37h14c3975_0.tar.bz2 245 KB
46.90 certifi-2018.8.24-py37_1.tar.bz2 139 KB
46.90 python-3.7.0-hc3d631a_0.tar.bz2 31.7 MB
46.90 cryptography-2.3.1-py37hc365091_0.tar.bz2 585 KB
46.90 pyopenssl-18.0.0-py37_0.tar.bz2 82 KB
46.90 libffi-3.2.1-hd88cf55_4.tar.bz2 43 KB
46.90 wheel-0.31.1-py37_0.tar.bz2 62 KB
46.90 six-1.11.0-py37_1.tar.bz2 21 KB
46.90 cffi-1.11.5-py37he75722e_1.tar.bz2 212 KB
46.90 urllib3-1.23-py37_0.tar.bz2 152 KB
46.90 pip-10.0.1-py37_0.tar.bz2 1.7 MB
46.90
46.90 ---------------------------------------------------
46.90 Total: 58.3 MB
46.90
46.90 Removed idna-2.7-py37_0.tar.bz2
46.90 Removed libstdcxx-ng-8.2.0-hdf63c60_1.tar.bz2
46.90 Removed requests-2.19.1-py37_0.tar.bz2
46.90 Removed sqlite-3.24.0-h84994c4_0.tar.bz2
46.90 Removed pycparser-2.18-py37_1.tar.bz2
46.90 Removed zlib-1.2.11-ha838bed_2.tar.bz2
46.90 Removed chardet-3.0.4-py37_1.tar.bz2
46.90 Removed conda-4.5.11-py37_0.tar.bz2
46.90 Removed libedit-3.1.20170329-h6b74fdf_2.tar.bz2
46.90 Removed yaml-0.1.7-had09818_2.tar.bz2
46.90 Removed xz-5.2.4-h14c3975_4.tar.bz2
46.90 Removed asn1crypto-0.24.0-py37_0.tar.bz2
46.90 Removed conda-env-2.6.0-1.tar.bz2
46.90 Removed setuptools-40.2.0-py37_0.tar.bz2
46.90 Removed readline-7.0-h7b6447c_5.tar.bz2
46.90 Removed pysocks-1.6.8-py37_0.tar.bz2
46.90 Removed pycosat-0.6.3-py37h14c3975_0.tar.bz2
46.90 Removed ncurses-6.1-hf484d3e_0.tar.bz2
46.90 Removed tk-8.6.8-hbc83047_0.tar.bz2
46.90 Removed openssl-1.0.2p-h14c3975_0.tar.bz2
46.90 Removed libgcc-ng-8.2.0-hdf63c60_1.tar.bz2
46.90 Removed ca-certificates-2018.03.07-0.tar.bz2
46.90 Removed ruamel_yaml-0.15.46-py37h14c3975_0.tar.bz2
46.90 Removed certifi-2018.8.24-py37_1.tar.bz2
46.90 Removed python-3.7.0-hc3d631a_0.tar.bz2
46.90 Removed cryptography-2.3.1-py37hc365091_0.tar.bz2
46.90 Removed pyopenssl-18.0.0-py37_0.tar.bz2
46.90 Removed libffi-3.2.1-hd88cf55_4.tar.bz2
46.90 Removed wheel-0.31.1-py37_0.tar.bz2
46.90 Removed six-1.11.0-py37_1.tar.bz2
46.90 Removed cffi-1.11.5-py37he75722e_1.tar.bz2
46.90 Removed urllib3-1.23-py37_0.tar.bz2
46.90 Removed pip-10.0.1-py37_0.tar.bz2
46.90 Cache location: /opt/miniconda/pkgs
46.90 Will remove the following packages:
46.90 /opt/miniconda/pkgs
46.90 -------------------
46.90
46.90 conda-env-2.6.0-1 6 KB
46.90
46.90 ---------------------------------------------------
46.90 Total: 6 KB
46.90
46.90 removing conda-env-2.6.0-1
46.90 source cache (/opt/miniconda/conda-bld/src_cache)
46.90 Size: 0 B
46.90
46.90 git cache (/opt/miniconda/conda-bld/git_cache)
46.90 Size: 0 B
46.90
46.90 hg cache (/opt/miniconda/conda-bld/hg_cache)
46.90 Size: 0 B
46.90
46.90 svn cache (/opt/miniconda/conda-bld/svn_cache)
46.90 Size: 0 B
46.90
46.90 Total: 0 B
46.90 Removing /opt/miniconda/conda-bld/src_cache
46.90 Removing /opt/miniconda/conda-bld/git_cache
46.90 Removing /opt/miniconda/conda-bld/hg_cache
46.90 Removing /opt/miniconda/conda-bld/svn_cache
47.21 Collecting numpy
47.21 Cache entry deserialization failed, entry ignored
47.95 Downloading https://files.pythonhosted.org/packages/45/b7/de7b8e67f2232c26af57c205aaad29fe17754f793404f59c8a730c7a191a/numpy-1.21.6.zip (10.3MB)
48.45 Cache entry deserialization failed, entry ignored
48.76 Cache entry deserialization failed, entry ignored
49.67 Installing build dependencies: started
51.32 Installing build dependencies: finished with status 'done'
51.75 Building wheels for collected packages: numpy
51.75 Running setup.py bdist_wheel for numpy: started
133.6 Running setup.py bdist_wheel for numpy: still running...
194.5 Running setup.py bdist_wheel for numpy: still running...
251.7 Running setup.py bdist_wheel for numpy: finished with status 'done'
251.7 Stored in directory: /root/.cache/pip/wheels/73/70/b5/557358663d5c8e7dcc61c63e487c005c0b3d1240d328500183
252.3 Successfully built numpy
252.3 Installing collected packages: numpy
253.6 Successfully installed numpy-1.21.6
253.6 You are using pip version 10.0.1, however version 24.0 is available.
253.6 You should consider upgrading via the 'pip install --upgrade pip' command.
253.9 Collecting packaging
254.0 Downloading https://files.pythonhosted.org/packages/49/df/1fceb2f8900f8639e278b056416d49134fb8d84c5942ffaa01ad34782422/packaging-24.0-py3-none-any.whl (53kB)
254.1 Installing collected packages: packaging
254.1 Successfully installed packaging-24.0
254.1 You are using pip version 10.0.1, however version 24.0 is available.
254.1 You should consider upgrading via the 'pip install --upgrade pip' command.
254.4 Collecting wheel>=0.35.1
254.5 Downloading https://files.pythonhosted.org/packages/c7/c3/55076fc728723ef927521abaa1955213d094933dc36d4a2008d5101e1af5/wheel-0.42.0-py3-none-any.whl (65kB)
254.6 Installing collected packages: wheel
254.6 Found existing installation: wheel 0.31.1
254.6 Uninstalling wheel-0.31.1:
254.6 Successfully uninstalled wheel-0.31.1
254.6 Successfully installed wheel-0.42.0
254.6 You are using pip version 10.0.1, however version 24.0 is available.
254.6 You should consider upgrading via the 'pip install --upgrade pip' command.
257.2 checking out submodule versions
257.2 onnxruntime/dockerfiles/scripts/checkout_submodules.sh: line 15: cd: onnx-tensorrt: No such file or directory
257.2 onnxruntime/dockerfiles/scripts/checkout_submodules.sh: line 15: return: can only `return' from a function or sourced script
257.2 8.5
257.2 Fetching origin
257.4 onnxruntime/dockerfiles/scripts/checkout_submodules.sh: line 27: cd: protobuf: No such file or directory
257.4 onnxruntime/dockerfiles/scripts/checkout_submodules.sh: line 27: return: can only `return' from a function or sourced script
257.4 error: pathspec '3.10.x' did not match any file(s) known to git
257.5 2024-05-28 22:45:46,621 tools_python_utils [INFO] - flatbuffers module is not installed. parse_config will not be available
257.5 Traceback (most recent call last):
257.5 File "/code/onnxruntime/tools/ci_build/build.py", line 72, in
257.5 _check_python_version()
257.5 File "/code/onnxruntime/tools/ci_build/build.py", line 60, in _check_python_version
257.5 f"Invalid Python version. At least Python 3.{required_minor_version} is required. "
257.5 __main__.UsageError: Invalid Python version. At least Python 3.8 is required. Actual Python version: 3.7.0 (default, Jun 28 2018, 13:15:42)
257.5 [GCC 7.2.0]
------
Dockerfile.tensorrt:23
--------------------
22 | # Prepare onnxruntime repository & build onnxruntime with TensorRT
23 | >>> RUN git clone --single-branch --branch ${ONNXRUNTIME_BRANCH} --recursive ${ONNXRUNTIME_REPO} onnxruntime &&\
24 | >>> /bin/sh onnxruntime/dockerfiles/scripts/install_common_deps.sh &&\
25 | >>> trt_version=${TRT_VERSION:0:3} &&\
26 | >>> /bin/sh onnxruntime/dockerfiles/scripts/checkout_submodules.sh ${trt_version} &&\
27 | >>> cd onnxruntime &&\
28 | >>> /bin/sh build.sh --allow_running_as_root --parallel --build_shared_lib --cuda_home /usr/local/cuda --cudnn_home /usr/lib/x86_64-linux-gnu/ --use_tensorrt --tensorrt_home /usr/lib/x86_64-linux-gnu/ --config Release --build_wheel --skip_tests --skip_submodule_sync --cmake_extra_defines '"CMAKE_CUDA_ARCHITECTURES='${CMAKE_CUDA_ARCHITECTURES}'"' &&\
29 | >>> pip install /code/onnxruntime/build/Linux/Release/dist/*.whl &&\
30 | >>> cd ..
31 |
--------------------
```
### Urgency
None
### Target platform
ubuntu 20.04
### Build script
cd dockerfiles
sudo docker build -t onnxruntime-trt -f Dockerfile.tensorrt .
### Error / output
Invalid Python version. At least Python 3.8 is required. Actual Python version: 3.7.0
### Visual Studio Version
_No response_
### GCC / Compiler Version
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.