From 039d53dff3102d3ac7bdcc3d102c68459a084439 Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Sun, 26 Dec 2021 15:26:25 +0100 Subject: 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 --- sci-libs/torchvision/Manifest | 1 + sci-libs/torchvision/metadata.xml | 11 +++++++ sci-libs/torchvision/torchvision-0.11.2.ebuild | 45 ++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 sci-libs/torchvision/Manifest create mode 100644 sci-libs/torchvision/metadata.xml create mode 100644 sci-libs/torchvision/torchvision-0.11.2.ebuild (limited to 'sci-libs/torchvision') 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 @@ + + + + + jpizarrocallejas@gmail.com + Jorge Pizarro Callejas + + + Enable CUDA support if enabled in PyTorch + + 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 +} -- cgit v1.2.3-65-gdbad