Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] Error when build directly from repository #21266

Closed
paulocoutinhox opened this issue Jul 5, 2024 · 2 comments
Closed

[Build] Error when build directly from repository #21266

paulocoutinhox opened this issue Jul 5, 2024 · 2 comments
Labels
build build issues; typically submitted using template ep:CUDA issues related to the CUDA execution provider ep:TensorRT issues related to TensorRT execution provider

Comments

@paulocoutinhox
Copy link

paulocoutinhox commented Jul 5, 2024

Describe the issue

Im trying clone and build on a Linux Ubuntu Host, but only get error:

507.1 __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) 

Urgency

No response

Target platform

Linux x64

Build script

if [ ! -d "onnxruntime" ]; then \
	git clone --branch v1.18.1 https://github.com/microsoft/onnxruntime.git; \
	cd onnxruntime && git submodule update --init; \
fi
cd onnxruntime/dockerfiles && docker build -t onnxruntime-trt -f Dockerfile.tensorrt .

Error / output

0.197 Cloning into 'onnxruntime'...
Updating files: 100% (8706/8706), done.
70.37 Submodule 'cmake/external/emsdk' (https://github.com/emscripten-core/emsdk.git) registered for path 'cmake/external/emsdk'
70.37 Submodule 'cmake/external/libprotobuf-mutator' (https://github.com/google/libprotobuf-mutator.git) registered for path 'cmake/external/libprotobuf-mutator'
70.37 Submodule 'cmake/external/onnx' (https://github.com/onnx/onnx.git) registered for path 'cmake/external/onnx'
70.38 Cloning into '/code/onnxruntime/cmake/external/emsdk'...
72.37 Cloning into '/code/onnxruntime/cmake/external/libprotobuf-mutator'...
73.81 Cloning into '/code/onnxruntime/cmake/external/onnx'...
82.95 Submodule path 'cmake/external/emsdk': checked out 'd52c46520124845b1e0e0525f2759299d840143f'
83.03 Submodule path 'cmake/external/libprotobuf-mutator': checked out '7a2ed51a6b682a83e345ff49fc4cfd7ca47550db'
83.94 Submodule path 'cmake/external/onnx': checked out '595228d99e3977ac27cb79d5963adda262af99ad'
83.95 Submodule 'third_party/benchmark' (https://github.com/google/benchmark.git) registered for path 'cmake/external/onnx/third_party/benchmark'
83.95 Submodule 'third_party/pybind11' (https://github.com/pybind/pybind11.git) registered for path 'cmake/external/onnx/third_party/pybind11'
83.96 Cloning into '/code/onnxruntime/cmake/external/onnx/third_party/benchmark'...
85.62 Cloning into '/code/onnxruntime/cmake/external/onnx/third_party/pybind11'...
92.56 Submodule path 'cmake/external/onnx/third_party/benchmark': checked out '2dd015dfef425c866d9a43f2c67d8b52d709acb6'
92.68 Submodule path 'cmake/external/onnx/third_party/pybind11': checked out '5b0a6fc2017fcc176545afe3e09c9f9885283242'
93.44 Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
93.44 Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease
93.64 Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [128 kB]
94.56 Hit:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
94.82 Fetched 128 kB in 2s (64.3 kB/s)
94.82 Reading package lists...
96.68 Reading package lists...
98.44 Building dependency tree...
98.72 Reading state information...
99.04 build-essential is already the newest version (12.8ubuntu1.1).
99.04 ca-certificates is already the newest version (20230311ubuntu0.20.04.1).
99.04 curl is already the newest version (7.68.0-1ubuntu2.22).
99.04 libssl-dev is already the newest version (1.1.1f-1ubuntu2.22).
99.04 wget is already the newest version (1.20.3-1ubuntu2.1).
99.04 The following additional packages will be installed:
99.04   libpython3-dev
99.04 Suggested packages:
99.04   libcurl4-doc libidn11-dev libkrb5-dev libldap2-dev librtmp-dev libssh2-1-dev
99.04   pkg-config
99.08 The following NEW packages will be installed:
99.09   libcurl4-openssl-dev libpython3-dev python3-dev zip
99.52 0 upgraded, 4 newly installed, 0 to remove and 16 not upgraded.
99.52 Need to get 498 kB of archives.
99.52 After this operation, 2244 kB of additional disk space will be used.
99.52 Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libcurl4-openssl-dev amd64 7.68.0-1ubuntu2.22 [322 kB]
101.1 Get:2 http://archive.ubuntu.com/ubuntu focal/main amd64 libpython3-dev amd64 3.8.2-0ubuntu2 [7236 B]
101.1 Get:3 http://archive.ubuntu.com/ubuntu focal/main amd64 python3-dev amd64 3.8.2-0ubuntu2 [1212 B]
101.1 Get:4 http://archive.ubuntu.com/ubuntu focal/main amd64 zip amd64 3.0-11build1 [167 kB]
101.5 debconf: unable to initialize frontend: Dialog
101.5 debconf: (TERM is not set, so the dialog frontend is not usable.)
101.5 debconf: falling back to frontend: Readline
101.6 debconf: unable to initialize frontend: Readline
101.6 debconf: (This frontend requires a controlling tty.)
101.6 debconf: falling back to frontend: Teletype
101.6 dpkg-preconfigure: unable to re-open stdin: 
101.6 Fetched 498 kB in 2s (233 kB/s)
101.6 Selecting previously unselected package libcurl4-openssl-dev:amd64.
(Reading database ... 24341 files and directories currently installed.)
101.7 Preparing to unpack .../libcurl4-openssl-dev_7.68.0-1ubuntu2.22_amd64.deb ...
101.7 Unpacking libcurl4-openssl-dev:amd64 (7.68.0-1ubuntu2.22) ...
101.8 Selecting previously unselected package libpython3-dev:amd64.
101.8 Preparing to unpack .../libpython3-dev_3.8.2-0ubuntu2_amd64.deb ...
101.8 Unpacking libpython3-dev:amd64 (3.8.2-0ubuntu2) ...
101.8 Selecting previously unselected package python3-dev.
101.8 Preparing to unpack .../python3-dev_3.8.2-0ubuntu2_amd64.deb ...
101.8 Unpacking python3-dev (3.8.2-0ubuntu2) ...
101.8 Selecting previously unselected package zip.
101.8 Preparing to unpack .../zip_3.0-11build1_amd64.deb ...
101.9 Unpacking zip (3.0-11build1) ...
101.9 Setting up libpython3-dev:amd64 (3.8.2-0ubuntu2) ...
101.9 Setting up zip (3.0-11build1) ...
101.9 Setting up libcurl4-openssl-dev:amd64 (7.68.0-1ubuntu2.22) ...
102.0 Setting up python3-dev (3.8.2-0ubuntu2) ...
107.5 PREFIX=/opt/miniconda
108.3 installing: python-3.7.0-hc3d631a_0 ...
114.3 Python 3.7.0 (default, Jun 28 2018, 13:15:42) 
114.3 [GCC 7.2.0]
114.3 installing: ca-certificates-2018.03.07-0 ...
114.4 installing: conda-env-2.6.0-1 ...
114.5 installing: libgcc-ng-8.2.0-hdf63c60_1 ...
116.1 installing: libstdcxx-ng-8.2.0-hdf63c60_1 ...
116.8 installing: libffi-3.2.1-hd88cf55_4 ...
116.9 installing: ncurses-6.1-hf484d3e_0 ...
117.7 installing: openssl-1.0.2p-h14c3975_0 ...
118.9 installing: xz-5.2.4-h14c3975_4 ...
119.0 installing: yaml-0.1.7-had09818_2 ...
119.1 installing: zlib-1.2.11-ha838bed_2 ...
119.2 installing: libedit-3.1.20170329-h6b74fdf_2 ...
119.3 installing: readline-7.0-h7b6447c_5 ...
119.5 installing: tk-8.6.8-hbc83047_0 ...
120.3 installing: sqlite-3.24.0-h84994c4_0 ...
120.7 installing: asn1crypto-0.24.0-py37_0 ...
120.8 installing: certifi-2018.8.24-py37_1 ...
120.9 installing: chardet-3.0.4-py37_1 ...
121.0 installing: idna-2.7-py37_0 ...
121.1 installing: pycosat-0.6.3-py37h14c3975_0 ...
121.2 installing: pycparser-2.18-py37_1 ...
121.3 installing: pysocks-1.6.8-py37_0 ...
121.4 installing: ruamel_yaml-0.15.46-py37h14c3975_0 ...
121.5 installing: six-1.11.0-py37_1 ...
121.6 installing: cffi-1.11.5-py37he75722e_1 ...
121.7 installing: setuptools-40.2.0-py37_0 ...
122.0 installing: cryptography-2.3.1-py37hc365091_0 ...
122.2 installing: wheel-0.31.1-py37_0 ...
122.3 installing: pip-10.0.1-py37_0 ...
122.8 installing: pyopenssl-18.0.0-py37_0 ...
122.9 installing: urllib3-1.23-py37_0 ...
123.0 installing: requests-2.19.1-py37_0 ...
123.1 installing: conda-4.5.11-py37_0 ...
123.6 installation finished.
124.1 Cache location: /opt/miniconda/pkgs
124.1 Will remove the following tarballs:
124.1 
124.1 /opt/miniconda/pkgs
124.1 -------------------
124.1 zlib-1.2.11-ha838bed_2.tar.bz2               101 KB
124.1 conda-4.5.11-py37_0.tar.bz2                  1.0 MB
124.1 chardet-3.0.4-py37_1.tar.bz2                 164 KB
124.1 wheel-0.31.1-py37_0.tar.bz2                   62 KB
124.1 libstdcxx-ng-8.2.0-hdf63c60_1.tar.bz2        2.9 MB
124.1 urllib3-1.23-py37_0.tar.bz2                  152 KB
124.1 requests-2.19.1-py37_0.tar.bz2                96 KB
124.1 conda-env-2.6.0-1.tar.bz2                      3 KB
124.1 pyopenssl-18.0.0-py37_0.tar.bz2               82 KB
124.1 ca-certificates-2018.03.07-0.tar.bz2         124 KB
124.1 pycosat-0.6.3-py37h14c3975_0.tar.bz2         105 KB
124.1 openssl-1.0.2p-h14c3975_0.tar.bz2            3.5 MB
124.1 certifi-2018.8.24-py37_1.tar.bz2             139 KB
124.1 six-1.11.0-py37_1.tar.bz2                     21 KB
124.1 libffi-3.2.1-hd88cf55_4.tar.bz2               43 KB
124.1 asn1crypto-0.24.0-py37_0.tar.bz2             154 KB
124.1 idna-2.7-py37_0.tar.bz2                       99 KB
124.1 xz-5.2.4-h14c3975_4.tar.bz2                  366 KB
124.1 libgcc-ng-8.2.0-hdf63c60_1.tar.bz2           7.6 MB
124.1 cryptography-2.3.1-py37hc365091_0.tar.bz2     585 KB
124.1 yaml-0.1.7-had09818_2.tar.bz2                 85 KB
124.1 pycparser-2.18-py37_1.tar.bz2                167 KB
124.1 tk-8.6.8-hbc83047_0.tar.bz2                  3.1 MB
124.1 sqlite-3.24.0-h84994c4_0.tar.bz2             1.8 MB
124.1 cffi-1.11.5-py37he75722e_1.tar.bz2           212 KB
124.1 readline-7.0-h7b6447c_5.tar.bz2              392 KB
124.1 ncurses-6.1-hf484d3e_0.tar.bz2               943 KB
124.1 libedit-3.1.20170329-h6b74fdf_2.tar.bz2      172 KB
124.1 ruamel_yaml-0.15.46-py37h14c3975_0.tar.bz2     245 KB
124.1 pip-10.0.1-py37_0.tar.bz2                    1.7 MB
124.1 setuptools-40.2.0-py37_0.tar.bz2             554 KB
124.1 pysocks-1.6.8-py37_0.tar.bz2                  22 KB
124.1 python-3.7.0-hc3d631a_0.tar.bz2             31.7 MB
124.1 
124.1 ---------------------------------------------------
124.1 Total:                                      58.3 MB
124.1 
124.1 Removed zlib-1.2.11-ha838bed_2.tar.bz2
124.1 Removed conda-4.5.11-py37_0.tar.bz2
124.1 Removed chardet-3.0.4-py37_1.tar.bz2
124.1 Removed wheel-0.31.1-py37_0.tar.bz2
124.1 Removed libstdcxx-ng-8.2.0-hdf63c60_1.tar.bz2
124.1 Removed urllib3-1.23-py37_0.tar.bz2
124.1 Removed requests-2.19.1-py37_0.tar.bz2
124.1 Removed conda-env-2.6.0-1.tar.bz2
124.1 Removed pyopenssl-18.0.0-py37_0.tar.bz2
124.1 Removed ca-certificates-2018.03.07-0.tar.bz2
124.1 Removed pycosat-0.6.3-py37h14c3975_0.tar.bz2
124.1 Removed openssl-1.0.2p-h14c3975_0.tar.bz2
124.1 Removed certifi-2018.8.24-py37_1.tar.bz2
124.1 Removed six-1.11.0-py37_1.tar.bz2
124.1 Removed libffi-3.2.1-hd88cf55_4.tar.bz2
124.1 Removed asn1crypto-0.24.0-py37_0.tar.bz2
124.1 Removed idna-2.7-py37_0.tar.bz2
124.1 Removed xz-5.2.4-h14c3975_4.tar.bz2
124.1 Removed libgcc-ng-8.2.0-hdf63c60_1.tar.bz2
124.1 Removed cryptography-2.3.1-py37hc365091_0.tar.bz2
124.1 Removed yaml-0.1.7-had09818_2.tar.bz2
124.1 Removed pycparser-2.18-py37_1.tar.bz2
124.1 Removed tk-8.6.8-hbc83047_0.tar.bz2
124.1 Removed sqlite-3.24.0-h84994c4_0.tar.bz2
124.1 Removed cffi-1.11.5-py37he75722e_1.tar.bz2
124.1 Removed readline-7.0-h7b6447c_5.tar.bz2
124.1 Removed ncurses-6.1-hf484d3e_0.tar.bz2
124.1 Removed libedit-3.1.20170329-h6b74fdf_2.tar.bz2
124.1 Removed ruamel_yaml-0.15.46-py37h14c3975_0.tar.bz2
124.1 Removed pip-10.0.1-py37_0.tar.bz2
124.1 Removed setuptools-40.2.0-py37_0.tar.bz2
124.1 Removed pysocks-1.6.8-py37_0.tar.bz2
124.1 Removed python-3.7.0-hc3d631a_0.tar.bz2
124.1 Cache location: /opt/miniconda/pkgs
124.1 Will remove the following packages:
124.1 /opt/miniconda/pkgs
124.1 -------------------
124.1 
124.1 conda-env-2.6.0-1                              6 KB
124.1 
124.1 ---------------------------------------------------
124.1 Total:                                         6 KB
124.1 
124.1 removing conda-env-2.6.0-1
124.1 source cache (/opt/miniconda/conda-bld/src_cache)
124.1 Size:                                           0 B
124.1 
124.1 git cache (/opt/miniconda/conda-bld/git_cache)
124.1 Size:                                           0 B
124.1 
124.1 hg cache (/opt/miniconda/conda-bld/hg_cache)
124.1 Size:                                           0 B
124.1 
124.1 svn cache (/opt/miniconda/conda-bld/svn_cache)
124.1 Size:                                           0 B
124.1 
124.1 Total:                                          0 B
124.1 Removing /opt/miniconda/conda-bld/src_cache
124.1 Removing /opt/miniconda/conda-bld/git_cache
124.1 Removing /opt/miniconda/conda-bld/hg_cache
124.1 Removing /opt/miniconda/conda-bld/svn_cache
124.7 Collecting numpy
124.7   Cache entry deserialization failed, entry ignored
126.0   Downloading https://files.pythonhosted.org/packages/45/b7/de7b8e67f2232c26af57c205aaad29fe17754f793404f59c8a730c7a191a/numpy-1.21.6.zip (10.3MB)
127.9   Cache entry deserialization failed, entry ignored
128.4   Cache entry deserialization failed, entry ignored
130.0   Installing build dependencies: started
133.5   Installing build dependencies: finished with status 'done'
134.4 Building wheels for collected packages: numpy
134.4   Running setup.py bdist_wheel for numpy: started
194.4   Running setup.py bdist_wheel for numpy: still running...
274.7   Running setup.py bdist_wheel for numpy: still running...
336.1   Running setup.py bdist_wheel for numpy: still running...
397.2   Running setup.py bdist_wheel for numpy: still running...
466.2   Running setup.py bdist_wheel for numpy: still running...
491.4   Running setup.py bdist_wheel for numpy: finished with status 'done'
491.4   Stored in directory: /root/.cache/pip/wheels/73/70/b5/557358663d5c8e7dcc61c63e487c005c0b3d1240d328500183
492.5 Successfully built numpy
492.6 Installing collected packages: numpy
495.1 Successfully installed numpy-1.21.6
495.2 You are using pip version 10.0.1, however version 24.0 is available.
495.2 You should consider upgrading via the 'pip install --upgrade pip' command.
495.9 Collecting packaging
496.0   Downloading https://files.pythonhosted.org/packages/49/df/1fceb2f8900f8639e278b056416d49134fb8d84c5942ffaa01ad34782422/packaging-24.0-py3-none-any.whl (53kB)
496.1 Installing collected packages: packaging
496.2 Successfully installed packaging-24.0
496.2 You are using pip version 10.0.1, however version 24.0 is available.
496.2 You should consider upgrading via the 'pip install --upgrade pip' command.
496.8 Collecting wheel>=0.35.1
497.0   Downloading https://files.pythonhosted.org/packages/c7/c3/55076fc728723ef927521abaa1955213d094933dc36d4a2008d5101e1af5/wheel-0.42.0-py3-none-any.whl (65kB)
497.1 Installing collected packages: wheel
497.1   Found existing installation: wheel 0.31.1
497.1     Uninstalling wheel-0.31.1:
497.1       Successfully uninstalled wheel-0.31.1
497.2 Successfully installed wheel-0.42.0
497.2 You are using pip version 10.0.1, however version 24.0 is available.
497.2 You should consider upgrading via the 'pip install --upgrade pip' command.
505.3 checking out submodule versions
505.3 8.5
505.3 onnxruntime/dockerfiles/scripts/checkout_submodules.sh: line 15: cd: onnx-tensorrt: No such file or directory
505.3 onnxruntime/dockerfiles/scripts/checkout_submodules.sh: line 15: return: can only `return' from a function or sourced script
505.3 Fetching origin
506.9 onnxruntime/dockerfiles/scripts/checkout_submodules.sh: line 27: cd: protobuf: No such file or directory
506.9 onnxruntime/dockerfiles/scripts/checkout_submodules.sh: line 27: return: can only `return' from a function or sourced script
506.9 error: pathspec '3.10.x' did not match any file(s) known to git
507.1 2024-07-05 20:46:47,926 tools_python_utils [INFO] - flatbuffers module is not installed. parse_config will not be available
507.1 Traceback (most recent call last):
507.1   File "/code/onnxruntime/tools/ci_build/build.py", line 72, in <module>
507.1     _check_python_version()
507.1   File "/code/onnxruntime/tools/ci_build/build.py", line 60, in _check_python_version
507.1     f"Invalid Python version. At least Python 3.{required_minor_version} is required. "
507.1 __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) 
507.1 [GCC 7.2.0]
------

 1 warning found (use --debug to expand):
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 20)
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 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c 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 .." did not complete successfully: exit code: 1
make: *** [Makefile:23: build-docker] Error 1

Visual Studio Version

No response

GCC / Compiler Version

No response

@paulocoutinhox paulocoutinhox added the build build issues; typically submitted using template label Jul 5, 2024
@github-actions github-actions bot added ep:CUDA issues related to the CUDA execution provider ep:TensorRT issues related to TensorRT execution provider labels Jul 5, 2024
@paulocoutinhox
Copy link
Author

Im trying build the CUDA version too, but errors again:

if [ ! -d "onnxruntime" ]; then \
	git clone --recursive --branch v1.18.1 https://github.com/microsoft/onnxruntime.git; \
fi
cd onnxruntime/dockerfiles && docker build -t onnxruntime-cuda -f Dockerfile.cuda ..

ERROR:

cd onnxruntime/dockerfiles && docker build -t onnxruntime-cuda -f Dockerfile.cuda ..
[+] Building 55.7s (10/13)                                                                                                                                               docker:default
 => [internal] load build definition from Dockerfile.cuda                                                                                                                          0.0s
 => => transferring dockerfile: 1.93kB                                                                                                                                             0.0s
 => WARN: MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label (line 10)                                                                             0.0s
 => [internal] load metadata for nvcr.io/nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04                                                                                             0.8s
 => [internal] load metadata for nvcr.io/nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04                                                                                               0.9s
 => [internal] load .dockerignore                                                                                                                                                  0.0s
 => => transferring context: 72B                                                                                                                                                   0.0s
 => [internal] load build context                                                                                                                                                  7.2s
 => => transferring context: 582.55MB                                                                                                                                              7.1s
 => CACHED [stage-0 1/4] FROM nvcr.io/nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04@sha256:21196d81f56b48dbee70494d5f10322e1a77cc47ffe202a3bf68eab81533c20f                          0.0s
 => CACHED [stage-1 1/4] FROM nvcr.io/nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04@sha256:f4d8e1264366940438f0353da6f289c7bef069d993d111f8106086ccd18c4a30                        0.0s
 => [stage-0 2/4] ADD . /code                                                                                                                                                      3.7s
 => [stage-0 3/4] RUN apt-get update && apt-get install -y --no-install-recommends python3-dev ca-certificates g++ python3-numpy gcc make git python3-setuptools python3-wheel p  42.0s
 => ERROR [stage-0 4/4] RUN cd /code && python3 -m pip install -r tools/ci_build/github/linux/docker/inference/x64/python/cpu/scripts/requirements.txt && /bin/bash ./build.sh --  1.7s 
------                                                                                                                                                                                  
 > [stage-0 4/4] RUN cd /code && python3 -m pip install -r tools/ci_build/github/linux/docker/inference/x64/python/cpu/scripts/requirements.txt && /bin/bash ./build.sh --allow_running_as_root --skip_submodule_sync --cuda_home /usr/local/cuda --cudnn_home /usr/lib/x86_64-linux-gnu/ --use_cuda --config Release --build_wheel --update --build --parallel --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER) 'CMAKE_CUDA_ARCHITECTURES=52;60;61;70;75;86':                                                                                         
1.346 ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'tools/ci_build/github/linux/docker/inference/x64/python/cpu/scripts/requirements.txt'              
------

 2 warnings found (use --debug to expand):
 - MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label (line 10)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 13)
Dockerfile.cuda:16
--------------------
  15 |     
  16 | >>> RUN cd /code && python3 -m pip install -r tools/ci_build/github/linux/docker/inference/x64/python/cpu/scripts/requireme\
  17 | >>> nts.txt && /bin/bash ./build.sh --allow_running_as_root --skip_submodule_sync --cuda_home /usr/local/cuda --cudnn_home /usr/lib/x86_64-linux-gnu/ --use_cuda --config Release --build_wheel --update --build --parallel --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER) 'CMAKE_CUDA_ARCHITECTURES=52;60;61;70;75;86'
  18 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c cd /code && python3 -m pip install -r tools/ci_build/github/linux/docker/inference/x64/python/cpu/scripts/requirements.txt && /bin/bash ./build.sh --allow_running_as_root --skip_submodule_sync --cuda_home /usr/local/cuda --cudnn_home /usr/lib/x86_64-linux-gnu/ --use_cuda --config Release --build_wheel --update --build --parallel --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER) 'CMAKE_CUDA_ARCHITECTURES=52;60;61;70;75;86'" did not complete successfully: exit code: 1
make: *** [Makefile:23: build-docker] Error 1

@snnn
Copy link
Member

snnn commented Jul 8, 2024

Please follow the instructions at https://github.com/microsoft/onnxruntime/blob/main/dockerfiles/README.md

@snnn snnn closed this as not planned Won't fix, can't repro, duplicate, stale Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build issues; typically submitted using template ep:CUDA issues related to the CUDA execution provider ep:TensorRT issues related to TensorRT execution provider
Projects
None yet
Development

No branches or pull requests

2 participants