From b51d8fc442bfafabad40da610c860cf601192e25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Thu, 10 Dec 2020 20:11:37 +0100 Subject: [PATCH] python3Packages.pytorch-bin: 1.7.0 -> 1.7.1 This also adds Python 3.9 compatibility. --- pkgs/development/python-modules/pytorch/bin.nix | 15 +++------------ .../python-modules/pytorch/binary-hashes.nix | 8 ++++++-- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/pytorch/bin.nix b/pkgs/development/python-modules/pytorch/bin.nix index f073c408f709..6a97e6d30a4f 100644 --- a/pkgs/development/python-modules/pytorch/bin.nix +++ b/pkgs/development/python-modules/pytorch/bin.nix @@ -3,6 +3,7 @@ , fetchurl , isPy37 , isPy38 +, isPy39 , python , nvidia_x11 , addOpenGLRunpath @@ -19,7 +20,7 @@ let platform = if stdenv.isDarwin then "darwin" else "linux"; srcs = import ./binary-hashes.nix version; unsupported = throw "Unsupported system"; - version = "1.7.0"; + version = "1.7.1"; in buildPythonPackage { inherit version; @@ -28,7 +29,7 @@ in buildPythonPackage { format = "wheel"; - disabled = !(isPy37 || isPy38); + disabled = !(isPy37 || isPy38 || isPy39); src = fetchurl srcs."${stdenv.system}-${pyVerNoDot}" or unsupported; @@ -45,16 +46,6 @@ in buildPythonPackage { typing-extensions ]; - # PyTorch are broken: the dataclasses wheel is required, but ships with - # Python >= 3.7. Our dataclasses derivation is incompatible with >= 3.7. - # - # https://github.com/pytorch/pytorch/issues/46930 - # - # Should be removed with the next PyTorch version. - pipInstallFlags = [ - "--no-deps" - ]; - postInstall = '' # ONNX conversion rm -rf $out/bin diff --git a/pkgs/development/python-modules/pytorch/binary-hashes.nix b/pkgs/development/python-modules/pytorch/binary-hashes.nix index afdde5057dbd..a542233e15e8 100644 --- a/pkgs/development/python-modules/pytorch/binary-hashes.nix +++ b/pkgs/development/python-modules/pytorch/binary-hashes.nix @@ -1,10 +1,14 @@ version: { x86_64-linux-37 = { url = "https://download.pytorch.org/whl/cu102/torch-${version}-cp37-cp37m-linux_x86_64.whl"; - sha256 = "0cvafwzd44d7i2d0y01lyk75lhxffcf6c94cx0wla0cnhcg9mqlf"; + hash = "sha256-XXbCVaQUhMHUGp/1cLnJ82y4XflCiqFaWK4WrHz8LqY="; }; x86_64-linux-38 = { url = "https://download.pytorch.org/whl/cu102/torch-${version}-cp38-cp38-linux_x86_64.whl"; - sha256 = "1vxswkb2gzp87sbb5ycvyvs8aw1szp3v2mwdn4mp47yarlnbx8r6"; + hash = "sha256-3S/GiAyV6DaWDYbvu8f2PTKH8uGJPFHTH5bb/gLw1z4="; + }; + x86_64-linux-39 = { + url = "https://download.pytorch.org/whl/cu102/torch-${version}-cp39-cp39-linux_x86_64.whl"; + hash = "sha256-o3k9zOsSseIoEpDMoSd8XOht39W/BE9lQoWk1pBXrqc="; }; }