Package Details: python-tensorrt 10.6.0.26-1

Git Clone URL: https://aur.archlinux.org/tensorrt.git (read-only, click to copy)
Package Base: tensorrt
Description: A platform for high-performance deep learning inference on NVIDIA hardware (python bindings and tools)
Upstream URL: https://developer.nvidia.com/tensorrt/
Keywords: ai artificial intelligence nvidia
Licenses: Apache-2.0, LicenseRef-custom
Provides: python-onnx-graphsurgeon, python-polygraphy, python-tensorflow-quantization
Submitter: dbermond
Maintainer: dbermond
Last Packager: dbermond
Votes: 20
Popularity: 0.98
First Submitted: 2018-07-29 16:17 (UTC)
Last Updated: 2024-11-08 22:21 (UTC)

Dependencies (18)

Sources (13)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 Next › Last »

dbermond commented on 2022-11-30 21:54 (UTC)

@Baytars I've just checked, and the package is building fine. It seems that something is wrong with your system, as that packages that you suggest to be handled with 'pip install' are already in makedepends. Also, notice that installing things with 'pip install' in a PKGBUILD is generally not acceptable.

Baytars commented on 2022-11-29 16:08 (UTC) (edited on 2022-11-29 17:47 (UTC) by Baytars)

Issue 1: could not find pybind11 missing pybind11_DIR
Fix: pip install pybind11[global]

Issue 2:

Looking for a CUDA compiler failed with the following output:
-- The CUDA compiler identification is unknown
CMake Error at /usr/local/share/cmake-3.23/Modules/CMakeDetermineCUDACompiler.cmake:633 (message):
  Failed to detect a default CUDA architecture.

Fix:

    cmake -B build -S TensorRT \
        ......
        -DCMAKE_CUDA_COMPILER="/opt/cuda/bin/nvcc" \  # add this line
        ......
        -Wno-dev

Issue 3: Specify CUDA_TOOLKIT_ROOT_DIR
Fix:

    cmake -B build -S TensorRT \
        ......
        -DCUDAToolkit_ROOT="/opt/cuda/" \ # add this line
        ......
        -Wno-dev

Issue 4:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/var/tmp/pamac-build/tensorrt/src/TensorRT/python/PY_CONFIG_INCLUDE
   used as include directory in directory /var/tmp/pamac-build/tensorrt/src/TensorRT/python
/var/tmp/pamac-build/tensorrt/src/TensorRT/python/PY_INCLUDE
   used as include directory in directory /var/tmp/pamac-build/tensorrt/src/TensorRT/python

Fix:

cd TensorRT/python
# add begin
sed -i 's/cmake \.\./cmake \.\. -DPY_INCLUDE=\"<path to Python lib escaping />\" -DPY_CONFIG_INCLUDE=\"<path to Python lib escaping />\"/g' ./build.sh
sed -i 's/\\#/#/g' ./build.sh # awk does not recognize the regular expression \#
# add end
./build.sh

Issue 5: No module named <build, onnx, installer ...>
Fix: pip install <build, onnx, installer ...>
Please fix. Thank you!

dbermond commented on 2022-11-03 23:00 (UTC)

@Twelfthnight I'm aware of the git submodule issue and I'm updating my AUR packages slowly as I can. I updated this package and now it is building fine. Thanks for the interest.

Twelfthnight commented on 2022-11-03 09:34 (UTC)

Hi, The new Git update will now refuse to clone repositories via --local clone optimization if there are symlinks in the object directory. This is due to this CVE

It causes this kind of errors

Cloning into '.../tensorrt/src/TensorRT/parsers/onnx'...
fatal: transport 'file' not allowed
fatal: clone of '.../tensorrt/src/onnx-tensorrt' into submodule path '.../tensorrt/src/TensorRT/parsers/onnx' failed
Failed to clone 'parsers/onnx'. Retry scheduled
Cloning into '.../tensorrt/src/TensorRT/third_party/cub'...
fatal: transport 'file' not allowed
fatal: clone of '.../tensorrt/src/cub-nvlabs' into submodule path '.../tensorrt/src/TensorRT/third_party/cub' failed
Failed to clone 'third_party/cub'. Retry scheduled
Cloning into '.../tensorrt/src/TensorRT/third_party/protobuf'...
fatal: transport 'file' not allowed
fatal: clone of '../tensorrt/src/protobuf-protocolbuffers' into submodule path '.../tensorrt/src/TensorRT/third_party/protobuf' failed
Failed to clone 'third_party/protobuf'. Retry scheduled
Cloning into '.../tensorrt/src/TensorRT/parsers/onnx'...
fatal: transport 'file' not allowed
fatal: clone of '.../tensorrt/src/onnx-tensorrt' into submodule path '.../tensorrt/src/TensorRT/parsers/onnx' failed
Failed to clone 'parsers/onnx' a second time, aborting

I managed to install tensorrt by setting

git config --global protocol.file.allow always

chengscott commented on 2022-10-14 17:00 (UTC)

@dbermond shall the tensorrt file name be in lowercase? tensorrt-8.4.3.1.linux.x86_64-gnu.cuda-11.6.cudnn8.4.tar.gz

dbermond commented on 2022-10-11 01:05 (UTC)

@acxz Sorry, but AUR helpers are not supported. Up to you to figure out why your favorite helper is not working as you expect.

acxz commented on 2022-10-05 23:31 (UTC)

@dbermond I am using an AUR helper, paru. For some reason, every time I run paru -Syu, the tensorrt package is also slated for an update, even though it has not received an update. Do you know why tensorrt is being rebuilt? Usually this happens when the version auto updates, but this doesn't seem to be the case for tensorrt. If you could take a look at this, it would be much appreciated.

FuzzyAtish commented on 2022-05-15 16:40 (UTC)

@dbermond Thank you for the prompt response and resolution! Once I reinstalled that package, this one was successfully built

dbermond commented on 2022-05-15 12:05 (UTC)

@FuzzyAtish You need to rebuild python-onnx against protobuf 3.20.x, as protobuf got a soname bump. Remember that you must carefully take care of all the needed AUR rebuilds, otherwise your AUR packages becomes broken as you could see.

FuzzyAtish commented on 2022-05-15 07:52 (UTC) (edited on 2022-05-15 07:58 (UTC) by FuzzyAtish)

Hello, I'm receiving the following error when running makepkg -si

[100%] Linking CXX shared library tensorrt/tensorrt.so
[100%] Built target tensorrt
awk: cmd. line:1: warning: regexp escape sequence `\#' is not a known regexp operator
awk: cmd. line:1: warning: regexp escape sequence `\#' is not a known regexp operator
awk: cmd. line:1: warning: regexp escape sequence `\#' is not a known regexp operator
awk: cmd. line:1: warning: regexp escape sequence `\#' is not a known regexp operator
Generating python 3.10 bindings for TensorRT 8.2.5.1
~/build/tensorrt/src/TensorRT/python/packaging ~/build/tensorrt/src/TensorRT/python/build ~/build/tensorrt/src/TensorRT/python
~/build/tensorrt/src/TensorRT/python/build ~/build/tensorrt/src/TensorRT/python
/usr/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
~/build/tensorrt/src/TensorRT/python
* Getting dependencies for wheel...
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/pep517/in_process/_in_process.py", line 363, in <module>
    main()
  File "/usr/lib/python3.10/site-packages/pep517/in_process/_in_process.py", line 345, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File "/usr/lib/python3.10/site-packages/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
    return hook(config_settings)
  File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 162, in get_requires_for_build_wheel
    return self._get_build_requires(
  File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 143, in _get_build_requires
    self.run_setup()
  File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 267, in run_setup
    super(_BuildMetaLegacyBackend,
  File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 158, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 19, in <module>
    import onnx_graphsurgeon
  File "/home/user/build/tensorrt/src/TensorRT/tools/onnx-graphsurgeon/onnx_graphsurgeon/__init__.py", line 1, in <module>
    from onnx_graphsurgeon.exporters.onnx_exporter import export_onnx
  File "/home/user/build/tensorrt/src/TensorRT/tools/onnx-graphsurgeon/onnx_graphsurgeon/exporters/onnx_exporter.py", line 19, in <module>
    import onnx
  File "/usr/lib/python3.10/site-packages/onnx/__init__.py", line 10, in <module>
    from .onnx_cpp2py_export import ONNX_ML
ImportError: libprotobuf.so.30: cannot open shared object file: No such file or directory

ERROR Backend subproccess exited when trying to invoke get_requires_for_build_wheel
==> ERROR: A failure occurred in build().
    Aborting...
warning: could not open directory 'pkg/': Permission denied

When inspecting the current directory, I see that pkg has only 111 rights

$ exa -lh                                                                                                                                                                                                                          0 (0.006s)
Permissions Size User Date Modified Name
.rw-r--r--   532 user 15 May 09:10  010-tensorrt-use-local-protobuf-sources.patch
.rw-r--r--  2.2k user 15 May 09:10  020-tensorrt-fix-python.patch
drwxr-xr-x     - user 15 May 10:10  benchmark
drwxr-xr-x     - user 15 May 10:10  cub-nvlabs
drwxr-xr-x     - user 15 May 10:10  onnx
drwxr-xr-x     - user 15 May 10:10  onnx-tensorrt
d--x--x--x     - user 15 May 10:38  pkg
.rw-r--r--  8.8k user 15 May 09:10  PKGBUILD
.rw-r--r--  4.7M user 15 May 09:32  protobuf-cpp-3.17.3.tar.gz
drwxr-xr-x     - user 15 May 10:10  protobuf-protocolbuffers
drwxr-xr-x     - user 15 May 10:10  pybind11
drwxr-xr-x     - user 15 May 10:38  src
drwxr-xr-x     - user 15 May 10:10  TensorRT
.rw-r--r--  1.2G user 15 May 09:28  TensorRT-8.2.5.1.Linux.x86_64-gnu.cuda-11.4.cudnn8.2.tar.gz
warning: could not open directory 'pkg/': Permission denied

Did anyone else come across this by any chance?