aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ammerlaan <andrewammerlaan@gentoo.org>2021-12-26 15:26:25 +0100
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2021-12-26 15:26:25 +0100
commit039d53dff3102d3ac7bdcc3d102c68459a084439 (patch)
tree38c1e0ce64eeca93e16bd69f58c550fbbd7bdd40 /sci-libs/torchvision
parentsci-chemistry/relion: drop USE cuda (diff)
downloadsci-039d53dff3102d3ac7bdcc3d102c68459a084439.tar.gz
sci-039d53dff3102d3ac7bdcc3d102c68459a084439.tar.bz2
sci-039d53dff3102d3ac7bdcc3d102c68459a084439.zip
sci-libs/torchvision: new package
Closes: https://github.com/gentoo/sci/issues/943 Closes: https://github.com/gentoo/sci/pull/944 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'sci-libs/torchvision')
-rw-r--r--sci-libs/torchvision/Manifest1
-rw-r--r--sci-libs/torchvision/metadata.xml11
-rw-r--r--sci-libs/torchvision/torchvision-0.11.2.ebuild45
3 files changed, 57 insertions, 0 deletions
diff --git a/sci-libs/torchvision/Manifest b/sci-libs/torchvision/Manifest
new file mode 100644
index 000000000..8e703b008
--- /dev/null
+++ b/sci-libs/torchvision/Manifest
@@ -0,0 +1 @@
+DIST torchvision-0.11.2.tar.gz 9361872 BLAKE2B a3086b1ac8a05ab1f8dac13c5ee15f75274a96cebb72b48b525ac9721c961c67d742878efa7ef4c245a885904ea88d2c2dde311df8ef710563c3656c2629b644 SHA512 11891d19c1a17d27fbcc95b576a7bba7d2d2b96673661bc8488505aded9c70e7ee09229732d42eac4a590e11fb8f0066fb5a2d9f5b7fa95265f54d533ffc1359
diff --git a/sci-libs/torchvision/metadata.xml b/sci-libs/torchvision/metadata.xml
new file mode 100644
index 000000000..ad3ef354b
--- /dev/null
+++ b/sci-libs/torchvision/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>jpizarrocallejas@gmail.com</email>
+ <name>Jorge Pizarro Callejas</name>
+ </maintainer>
+ <use>
+ <flag name="cuda">Enable CUDA support if enabled in PyTorch</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-libs/torchvision/torchvision-0.11.2.ebuild b/sci-libs/torchvision/torchvision-0.11.2.ebuild
new file mode 100644
index 000000000..6c58eeb6e
--- /dev/null
+++ b/sci-libs/torchvision/torchvision-0.11.2.ebuild
@@ -0,0 +1,45 @@
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_10 )
+
+inherit distutils-r1
+
+DESCRIPTION="Datasets, transforms and models to specific to computer vision"
+HOMEPAGE="https://github.com/pytorch/vision"
+SRC_URI="https://github.com/pytorch/vision/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="cuda test"
+
+RDEPEND="
+ dev-python/av[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ dev-python/tqdm[${PYTHON_USEDEP}]
+ dev-python/scipy[${PYTHON_USEDEP}]
+ sci-libs/pytorch[cuda?,python,${PYTHON_USEDEP}]
+ media-video/ffmpeg
+ dev-qt/qtcore:5
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ test? (
+ dev-python/mock[${PYTHON_USEDEP}]
+ )"
+
+S="${WORKDIR}/vision-${PV}"
+
+distutils_enable_tests pytest
+
+pkg_setup() {
+ if use cuda; then
+ 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"
+ fi
+}