blob: b17ac90076ceaae3630971d334c4ed3a6606c1ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{8..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"
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_USEDEP}]
media-video/ffmpeg
dev-qt/qtcore:5
"
DEPEND="${RDEPEND}"
BDEPEND="
test? (
$(python_gen_cond_dep '
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
}
|