summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorsL1pKn072023-06-01 16:58:22 +0200
committersL1pKn072023-06-01 16:58:22 +0200
commitf37cb82f047df69f5164bdde4c36abb5804314fd (patch)
treee0df11cc482b79d6a69364d6d5d7620d2478bff0 /PKGBUILD
parentaf6182eb978819bbdbd077fb4f370176c125ab88 (diff)
downloadaur-f37cb82f047df69f5164bdde4c36abb5804314fd.tar.gz
bump
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD36
1 files changed, 22 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c135640dda0f..b72c498b0c12 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,17 +7,23 @@ pkgdesc="PyTorch/TorchScript/FX compiler for NVIDIA GPUs using TensorRT"
arch=('x86_64')
url='https://github.com/pytorch/TensorRT'
license=('BSD')
-depends=('python-pytorch-opt-cuda'
- 'python-tensorrt'
- 'python-torchvision-cuda'
- 'python-graphviz'
- 'python-pydot'
- )
-makedepends=('git'
- 'cmake'
- 'ninja'
- 'python-pip'
- )
+depends=(
+ 'python-pytorch-opt-cuda'
+ 'python-tensorrt'
+ 'python-torchvision-cuda'
+ 'python-graphviz'
+ 'python-pydot'
+)
+makedepends=(
+ 'git'
+ 'cmake'
+ 'ninja'
+ 'cuda'
+ 'python-build'
+ 'python-wheel'
+ 'python-installer'
+ 'python-setuptools'
+)
source=("git+https://github.com/pytorch/TensorRT.git#tag=v${pkgver}")
sha256sums=('SKIP')
options=('debug')
@@ -32,7 +38,8 @@ prepare() {
}
build() {
-
+ export CC=/opt/cuda/bin/gcc
+ export CXX=/opt/cuda/bin/g++
export CXXFLAGS+=" -std=c++14"
export PATH="${srcdir}/path:${PATH}"
@@ -40,7 +47,8 @@ build() {
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_SKIP_RPATH=ON \
- -DCMAKE_SKIP_INSTALL_RPATH=ON
+ -DCMAKE_SKIP_INSTALL_RPATH=ON \
+ -DCUDA_HOST_COMPILER=/opt/cuda/bin/g++
cmake --build build
@@ -53,7 +61,7 @@ package() {
DESTDIR="${pkgdir}" cmake --install build
cd TensorRT/py
- pip install -I -U --root "${pkgdir}" --no-warn-script-location --no-deps dist/*.whl
+ python -m installer --destdir="${pkgdir}" dist/*.whl
_site_packages="$(python -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')"
(mkdir -p "${pkgdir}${_site_packages}/torch_tensorrt/lib"; ln -s /usr/lib/libtorchtrt.so "${pkgdir}${_site_packages}/torch_tensorrt/lib/libtorchtrt.so")