torchvision: 0.2.1 -> 0.8.2

This commit is contained in:
Sandro Jäckel 2020-12-30 00:04:35 +01:00
parent 86102ebe5e
commit 77c70abb81
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -1,30 +1,48 @@
{ buildPythonPackage { stdenv
, fetchPypi , buildPythonPackage
, six , fetchFromGitHub
, ninja
, which
, libjpeg_turbo
, libpng
, numpy , numpy
, scipy
, pillow , pillow
, pytorch , pytorch
, lib , pytestCheckHook
}: }:
buildPythonPackage rec { buildPythonPackage rec {
version = "0.2.1"; pname = "torchvision";
pname = "torchvision"; version = "0.8.2";
format = "wheel"; src = fetchFromGitHub {
owner = "pytorch";
src = fetchPypi { repo = "vision";
inherit pname version; rev = "v${version}";
format = "wheel"; sha256 = "0yhpbq7linrk2qp5jxsvlgkmwa5bn38s9kcswy4jzvmx1fjbkpq0";
sha256 = "18gvdabkmzfjg47ns0lw38mf85ry28nq1mas5rzlwvb4l5zmw2ms";
}; };
propagatedBuildInputs = [ six numpy pillow pytorch ]; nativeBuildInputs = [ libpng ninja which ];
meta = { TORCHVISION_INCLUDE="${libjpeg_turbo.dev}/include/";
TORCHVISION_LIBRARY="${libjpeg_turbo}/lib/";
buildInputs = [ libjpeg_turbo libpng ];
propagatedBuildInputs = [ numpy pillow pytorch scipy ];
# checks fail to import _C.so and various other failures
doCheck = false;
checkInputs = [ pytestCheckHook ];
pytestFlagsArray = [ "--ignore=test/test_datasets_download.py" ];
meta = with stdenv.lib; {
description = "PyTorch vision library"; description = "PyTorch vision library";
homepage = "https://pytorch.org/"; homepage = "https://pytorch.org/";
license = lib.licenses.bsd3; license = licenses.bsd3;
maintainers = with lib.maintainers; [ ericsagnes ]; maintainers = with maintainers; [ ericsagnes SuperSandro2000 ];
}; };
} }