summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlilac2020-01-16 04:06:46 +0800
committerlilac2020-01-16 04:06:46 +0800
commit1353d49cbddab483a6f7cc3decefb161db6263d8 (patch)
treee9c226d5afac9434b3a9f4db41a07236e731185c
parentfea261e4bb6bdf4486067808cbde55e34428496b (diff)
downloadaur-1353d49cbddab483a6f7cc3decefb161db6263d8.tar.gz
update by lilac
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD14
2 files changed, 13 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4a6afd7e3a4..79b143b0f94 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = python-torchvision
pkgdesc = Datasets, transforms, and models specific to computer vision
pkgver = 0.4.2
- pkgrel = 4
+ pkgrel = 7
url = https://github.com/pytorch/vision
arch = x86_64
license = BSD
@@ -15,13 +15,13 @@ pkgbase = python-torchvision
makedepends = qt5-base
depends = python-numpy
depends = python-pillow
- depends = python-pytorch
+ depends = python-pytorch-cuda
depends = python-scipy
depends = python-six
depends = python-tqdm
optdepends = ffmpeg: video reader backend (the recommended one with better performance)
optdepends = python-av: video reader backend (the default one)
- source = https://github.com/pytorch/vision/archive/v0.4.2.tar.gz
+ source = vision-0.4.2.tar.gz::https://github.com/pytorch/vision/archive/v0.4.2.tar.gz
sha512sums = 3327364bd1c10f4f0fdf9f8c1bed3848cbd887ee335634a0da6eb7a2611037408eee6261cd178d12225be5f2c809a05ff9fb87420b8accd447a799ca83def3ad
pkgname = python-torchvision
diff --git a/PKGBUILD b/PKGBUILD
index 3e53690bc66..7aa2040a068 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@
pkgname=python-torchvision
_pkgname=vision
pkgver=0.4.2
-pkgrel=4
+pkgrel=7
pkgdesc='Datasets, transforms, and models specific to computer vision'
arch=('x86_64')
url='https://github.com/pytorch/vision'
@@ -15,7 +15,7 @@ license=('BSD')
depends=(
'python-numpy'
'python-pillow'
- 'python-pytorch'
+ 'python-pytorch-cuda'
'python-scipy'
'python-six'
'python-tqdm'
@@ -36,17 +36,23 @@ checkdepends=(
'python-pytest'
'python-scipy'
)
-source=("https://github.com/pytorch/vision/archive/v${pkgver}.tar.gz")
+source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/pytorch/vision/archive/v${pkgver}.tar.gz")
sha512sums=('3327364bd1c10f4f0fdf9f8c1bed3848cbd887ee335634a0da6eb7a2611037408eee6261cd178d12225be5f2c809a05ff9fb87420b8accd447a799ca83def3ad')
+get_pyver() {
+ python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
+}
+
build() {
+ export FORCE_CUDA=1
+ export TORCH_CUDA_ARCH_LIST="3.5;3.7;5.0;5.2;5.3;6.0;6.0+PTX;6.1;6.1+PTX;6.2;6.2+PTX;7.0;7.0+PTX;7.2;7.2+PTX;7.5;7.5+PTX"
cd "${_pkgname}-${pkgver}"
python setup.py build
}
check() {
cd "${_pkgname}-${pkgver}"
- PYTHONPATH="${PWD}/build/lib.linux-${CARCH}-3.8" pytest -v
+ PYTHONPATH="${PWD}/build/lib.linux-${CARCH}-$(get_pyver)" pytest -v
}
package() {