Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions pkgs/development/python-modules/coqui-trainer/default.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{ lib
, buildPythonPackage
, fetchpatch
, fetchFromGitHub
, pythonAtLeast

, coqpit
, fsspec
, pytorch
, pytorch-bin

, pytestCheckHook
, soundfile
, tensorboardx
, torchvision
, torchvision-bin
}:

let
Expand All @@ -20,27 +21,35 @@ buildPythonPackage {
inherit pname version;
format = "pyproject";

disabled = pythonAtLeast "3.10"; # https://github.com/coqui-ai/Trainer/issues/22

src = fetchFromGitHub {
owner = "coqui-ai";
repo = "Trainer";
rev = "v${version}";
hash = "sha256-NsgCh+N2qWmRkTOjXqisVCP5aInH2zcNz6lsnIfVLiY=";
};

patches = [
(fetchpatch {
url = "https://github.com/coqui-ai/Trainer/commit/07b447abf3290c8f2e5e723687b8a480b7382265.patch";
sha256 = "0v1hl784d9rghkblcfwgzp0gg9d6r5r0yv2kapzdz2qymiajy7y2";
})
];

propagatedBuildInputs = [
coqpit
fsspec
pytorch
pytorch-bin
soundfile
tensorboardx
];

# only one test and that requires training data from the internet
doCheck = false;

checkInputs = [
pytestCheckHook
torchvision
torchvision-bin
];

pythonImportsCheck = [
Expand Down
5 changes: 3 additions & 2 deletions pkgs/development/python-modules/pytorch/bin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
, isPy37
, isPy38
, isPy39
, isPy310
, python
, addOpenGLRunpath
, future
Expand All @@ -19,7 +20,7 @@ let
pyVerNoDot = builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion;
srcs = import ./binary-hashes.nix version;
unsupported = throw "Unsupported system";
version = "1.10.0";
version = "1.11.0";
in buildPythonPackage {
inherit version;

Expand All @@ -28,7 +29,7 @@ in buildPythonPackage {

format = "wheel";

disabled = !(isPy37 || isPy38 || isPy39);
disabled = !(isPy37 || isPy38 || isPy39 || isPy310);

src = fetchurl srcs."${stdenv.system}-${pyVerNoDot}" or unsupported;

Expand Down
65 changes: 40 additions & 25 deletions pkgs/development/python-modules/pytorch/binary-hashes.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,61 @@
# To add a new version, run "prefetch.sh 'new-version'" to paste the generated file as follows.

version : builtins.getAttr version {
"1.10.0" = {
"1.11.0" = {
x86_64-linux-37 = {
name = "torch-1.10.0-cp37-cp37m-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu113/torch-1.10.0%2Bcu113-cp37-cp37m-linux_x86_64.whl";
hash = "sha256-KpDbklee2HXSqgrWr1U1nj8EJqUjBWp7SbACw8xtKtg=";
name = "torch-1.11.0-cp37-cp37m-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu113/torch-1.11.0%2Bcu113-cp37-cp37m-linux_x86_64.whl";
hash = "sha256-9WMzRw2uo8lweLN2B+ADXMz3L8XDb9hFRuGkuNmUTys=";
};
x86_64-linux-38 = {
name = "torch-1.10.0-cp38-cp38-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu113/torch-1.10.0%2Bcu113-cp38-cp38-linux_x86_64.whl";
hash = "sha256-zM3cMriUG9A+3in/ChzOLytRETpe4ju4uXkxasIRQYM=";
name = "torch-1.11.0-cp38-cp38-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu113/torch-1.11.0%2Bcu113-cp38-cp38-linux_x86_64.whl";
hash = "sha256-tqeZvbbuPZFOXmK920J21KECSMGvTy0hdzjl+e4nSFs=";
};
x86_64-linux-39 = {
name = "torch-1.10.0-cp39-cp39-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu113/torch-1.10.0%2Bcu113-cp39-cp39-linux_x86_64.whl";
hash = "sha256-w8UJDh4b5cgDu7ZSvDoKzNH4hiXEyRfvpycNOg+wJOg=";
name = "torch-1.11.0-cp39-cp39-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu113/torch-1.11.0%2Bcu113-cp39-cp39-linux_x86_64.whl";
hash = "sha256-6RJrCl2VcEvuQKnQ7xy9gtjceGPkY4o3a+9wLf1lk3A=";
};
x86_64-linux-310 = {
name = "torch-1.11.0-cp310-cp310-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu113/torch-1.11.0%2Bcu113-cp310-cp310-linux_x86_64.whl";
hash = "sha256-powzZXpUYTHrm8ROKpjS+nBKr66GFGCwUbgoE4Usy0Q=";
};
x86_64-darwin-37 = {
name = "torch-1.10.0-cp37-none-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-1.10.0-cp37-none-macosx_10_9_x86_64.whl";
hash = "sha256-RJkFVUcIfX736KdU8JwsTxRwKXrj5UkDY9umbHVQGyE=";
name = "torch-1.11.0-cp37-none-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-1.11.0-cp37-none-macosx_10_9_x86_64.whl";
hash = "sha256-aGCx0b8LsLZ6a9R/haDkyCW1GO6hO11hAZmdu8vVvAw=";
};
x86_64-darwin-38 = {
name = "torch-1.10.0-cp38-none-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-1.10.0-cp38-none-macosx_10_9_x86_64.whl";
hash = "sha256-rvevti6bF0tODl4eSkLjurO4SQpmjWZvYvfUUXVZ+/I=";
name = "torch-1.11.0-cp38-none-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-1.11.0-cp38-none-macosx_10_9_x86_64.whl";
hash = "sha256-DMyFzQYiej7fgJ4seV/Vdiw9Too4tcn3RMbnz4QTYbs=";
};
x86_64-darwin-39 = {
name = "torch-1.10.0-cp39-none-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-1.10.0-cp39-none-macosx_10_9_x86_64.whl";
hash = "sha256-1u+HRwtE35lw6EVCVH1bp3ILuJYWYCRB31VaObEk4rw=";
name = "torch-1.11.0-cp39-none-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-1.11.0-cp39-none-macosx_10_9_x86_64.whl";
hash = "sha256-UP2b+FxXjIccKPHLCs6d/GAkQBx/OZsXT7DzcImfRFQ=";
};
x86_64-darwin-310 = {
name = "torch-1.11.0-cp310-none-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-1.11.0-cp39-none-macosx_10_9_x86_64.whl";
hash = "sha256-UP2b+FxXjIccKPHLCs6d/GAkQBx/OZsXT7DzcImfRFQ=";
};
aarch64-darwin-38 = {
name = "torch-1.10.0-cp38-none-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-1.10.0-cp38-none-macosx_11_0_arm64.whl";
hash = "sha256-1hhYJ7KFeAZTzdgdd6Cf3KdqWxkNWYbVUr4qXEQs+qQ=";
name = "torch-1.11.0-cp38-none-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-1.11.0-cp38-none-macosx_11_0_arm64.whl";
hash = "sha256-wVVOSddPGyw+cgLXcFa6LddGVDdYW6xkBitYD3FKROk=";
};
aarch64-darwin-39 = {
name = "torch-1.10.0-cp39-none-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-1.10.0-cp39-none-macosx_11_0_arm64.whl";
hash = "sha256-7qZ17AHsS0oGVf0phPFmpco7kz2uatTrTlLrpwJtwXY=";
name = "torch-1.11.0-cp39-none-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-1.11.0-cp39-none-macosx_11_0_arm64.whl";
hash = "sha256-DkivZq11Xw+cXyZkAopBT1fEnWrcN+d+Bv4ABNpO22E=";
};
aarch64-darwin-310 = {
name = "torch-1.11.0-cp310-none-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-1.11.0-cp39-none-macosx_11_0_arm64.whl";
hash = "sha256-DkivZq11Xw+cXyZkAopBT1fEnWrcN+d+Bv4ABNpO22E=";
};
};
}
17 changes: 13 additions & 4 deletions pkgs/development/python-modules/pytorch/prefetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@ set -eou pipefail

version=$1

bucket="https://download.pytorch.org/whl/cu113"
linux_bucket="https://download.pytorch.org/whl/cu113"
darwin_bucket="https://download.pytorch.org/whl/cpu"

url_and_key_list=(
"x86_64-linux-37 $bucket/torch-${version}%2Bcu113-cp37-cp37m-linux_x86_64.whl torch-${version}-cp37-cp37m-linux_x86_64.whl"
"x86_64-linux-38 $bucket/torch-${version}%2Bcu113-cp38-cp38-linux_x86_64.whl torch-${version}-cp38-cp38-linux_x86_64.whl"
"x86_64-linux-39 $bucket/torch-${version}%2Bcu113-cp39-cp39-linux_x86_64.whl torch-${version}-cp39-cp39-linux_x86_64.whl"
"x86_64-linux-37 $linux_bucket/torch-${version}%2Bcu113-cp37-cp37m-linux_x86_64.whl torch-${version}-cp37-cp37m-linux_x86_64.whl"
"x86_64-linux-38 $linux_bucket/torch-${version}%2Bcu113-cp38-cp38-linux_x86_64.whl torch-${version}-cp38-cp38-linux_x86_64.whl"
"x86_64-linux-39 $linux_bucket/torch-${version}%2Bcu113-cp39-cp39-linux_x86_64.whl torch-${version}-cp39-cp39-linux_x86_64.whl"
"x86_64-linux-310 $linux_bucket/torch-${version}%2Bcu113-cp310-cp310-linux_x86_64.whl torch-${version}-cp310-cp310-linux_x86_64.whl"
"x86_64-darwin-37 $darwin_bucket/torch-${version}-cp37-none-macosx_10_9_x86_64.whl torch-${version}-cp37-none-macosx_10_9_x86_64.whl"
"x86_64-darwin-38 $darwin_bucket/torch-${version}-cp38-none-macosx_10_9_x86_64.whl torch-${version}-cp38-none-macosx_10_9_x86_64.whl"
"x86_64-darwin-39 $darwin_bucket/torch-${version}-cp39-none-macosx_10_9_x86_64.whl torch-${version}-cp39-none-macosx_10_9_x86_64.whl"
"x86_64-darwin-310 $darwin_bucket/torch-${version}-cp310-none-macosx_10_9_x86_64.whl torch-${version}-cp310-none-macosx_10_9_x86_64.whl"
"aarch64-darwin-38 $darwin_bucket/torch-${version}-cp38-none-macosx_11_0_arm64.whl torch-${version}-cp38-none-macosx_11_0_arm64.whl"
"aarch64-darwin-39 $darwin_bucket/torch-${version}-cp39-none-macosx_11_0_arm64.whl torch-${version}-cp39-none-macosx_11_0_arm64.whl"
"aarch64-darwin-310 $darwin_bucket/torch-${version}-cp310-none-macosx_11_0_arm64.whl torch-${version}-cp310-none-macosx_11_0_arm64.whl"
)

hashfile="binary-hashes-$version.nix"
Expand Down
8 changes: 6 additions & 2 deletions pkgs/development/python-modules/torchaudio/bin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
, stdenv
, buildPythonPackage
, fetchurl
, isPy37
, isPy38
, isPy39
, isPy310
, python
, pytorch-bin
, pythonOlder
Expand All @@ -10,7 +14,7 @@

buildPythonPackage rec {
pname = "torchaudio";
version = "0.10.0";
version = "0.11.0";
format = "wheel";

src =
Expand All @@ -19,7 +23,7 @@ buildPythonPackage rec {
srcs = (import ./binary-hashes.nix version)."${stdenv.system}-${pyVerNoDot}" or unsupported;
in fetchurl srcs;

disabled = ! (pythonAtLeast "3.7" && pythonOlder "3.10");
disabled = !(isPy37 || isPy38 || isPy39 || isPy310);

propagatedBuildInputs = [
pytorch-bin
Expand Down
60 changes: 50 additions & 10 deletions pkgs/development/python-modules/torchaudio/binary-hashes.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,61 @@
# To add a new version, run "prefetch.sh 'new-version'" to paste the generated file as follows.

version : builtins.getAttr version {
"0.10.0" = {
"0.11.0" = {
x86_64-linux-37 = {
name = "torchaudio-0.10.0-cp37-cp37m-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu113/torchaudio-0.10.0%2Bcu113-cp37-cp37m-linux_x86_64.whl";
hash = "sha256-FspXTTODdkO0nPUJcJm8+vLIvckUa8gRfBPBT9LcKPw=";
name = "torchaudio-0.11.0-cp37-cp37m-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu113/torchaudio-0.11.0%2Bcu113-cp37-cp37m-linux_x86_64.whl";
hash = "sha256-AdqgntXh2rTD7rBePshFAQ2tVl7b+734wG4r471/Y2U=";
};
x86_64-linux-38 = {
name = "torchaudio-0.10.0-cp38-cp38-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu113/torchaudio-0.10.0%2Bcu113-cp38-cp38-linux_x86_64.whl";
hash = "sha256-Mf7QdXBSIIWRfT7ACthEwFA1V2ieid8legbMnRQnzqI=";
name = "torchaudio-0.11.0-cp38-cp38-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu113/torchaudio-0.11.0%2Bcu113-cp38-cp38-linux_x86_64.whl";
hash = "sha256-zuCHDpz3bkOUjYWprqX9VXoUbXfR8Vhdf1VFfOUg8z4=";
};
x86_64-linux-39 = {
name = "torchaudio-0.10.0-cp39-cp39-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu113/torchaudio-0.10.0%2Bcu113-cp39-cp39-linux_x86_64.whl";
hash = "sha256-LMSGNdmku1iHRy1jCRTTOYcQlRL+Oc9jjZC1nx++skA=";
name = "torchaudio-0.11.0-cp39-cp39-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu113/torchaudio-0.11.0%2Bcu113-cp39-cp39-linux_x86_64.whl";
hash = "sha256-btI9TpsOjeLnIz6J56avNv4poJTpXjjhDbMy6+ZFQvI=";
};
x86_64-linux-310 = {
name = "torchaudio-0.11.0-cp310-cp310-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu113/torchaudio-0.11.0%2Bcu113-cp310-cp310-linux_x86_64.whl";
hash = "sha256-Zk+AWytEXfJ+HM69BAPhVsvN6pgQwC6uaW7Xux2row4=";
};
x86_64-darwin-37 = {
name = "torchaudio-0.11.0-cp37-cp37m-macosx_10_15_x86_64.whl";
url = "https://download.pytorch.org/whl/torchaudio-0.11.0-cp37-cp37m-macosx_10_15_x86_64.whl";
hash = "sha256-uaTT4athEWHAZe0hBoBIM/9LhfZNhAIexZBGg2MWn50=";
};
x86_64-darwin-38 = {
name = "torchaudio-0.11.0-cp38-cp38-macosx_10_15_x86_64.whl";
url = "https://download.pytorch.org/whl/torchaudio-0.11.0-cp38-cp38-macosx_10_15_x86_64.whl";
hash = "sha256-9OndqejTzgu9XnkZJiGfUFS4uFNlx5vi7pAzOs+a2/w=";
};
x86_64-darwin-39 = {
name = "torchaudio-0.11.0-cp39-cp39-macosx_10_15_x86_64.whl";
url = "https://download.pytorch.org/whl/torchaudio-0.11.0-cp39-cp39-macosx_10_15_x86_64.whl";
hash = "sha256-cNi8B/J3YI0jqaoI2z+68DVmAlS8EtmzYWQMRVZ3dVk=";
};
x86_64-darwin-310 = {
name = "torchaudio-0.11.0-cp310-cp310-macosx_10_15_x86_64.whl";
url = "https://download.pytorch.org/whl/torchaudio-0.11.0-cp310-cp310-macosx_10_15_x86_64.whl";
hash = "sha256-g2Pj2wqK9YIP19O/g5agryPcgiHJqdS2Di44mAVJKUQ=";
};
aarch64-darwin-38 = {
name = "torchaudio-0.11.0-cp38-cp38-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/torchaudio-0.11.0-cp38-cp38-macosx_11_0_arm64.whl";
hash = "sha256-MX/Y7Dn92zrx2tkGWTuezcPt9o5/V4DEL43pVlha5IA=";
};
aarch64-darwin-39 = {
name = "torchaudio-0.11.0-cp39-cp39-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/torchaudio-0.11.0-cp39-cp39-macosx_11_0_arm64.whl";
hash = "sha256-5eVRP83VeHAGGWW++/B2V4eyX0mcPgC1j02ETkQYMXc=";
};
aarch64-darwin-310 = {
name = "torchaudio-0.11.0-cp310-cp310-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/torchaudio-0.11.0-cp310-cp310-macosx_11_0_arm64.whl";
hash = "sha256-06OyzOuV8E7ZNtozvFO9Zm2rBxWnnbM65HGYUiQdwtI=";
};
};
}
17 changes: 13 additions & 4 deletions pkgs/development/python-modules/torchaudio/prefetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@ set -eou pipefail

version=$1

bucket="https://download.pytorch.org/whl/cu113"
linux_bucket="https://download.pytorch.org/whl/cu113"
darwin_bucket="https://download.pytorch.org/whl"

url_and_key_list=(
"x86_64-linux-37 $bucket/torchaudio-${version}%2Bcu113-cp37-cp37m-linux_x86_64.whl torchaudio-${version}-cp37-cp37m-linux_x86_64.whl"
"x86_64-linux-38 $bucket/torchaudio-${version}%2Bcu113-cp38-cp38-linux_x86_64.whl torchaudio-${version}-cp38-cp38-linux_x86_64.whl"
"x86_64-linux-39 $bucket/torchaudio-${version}%2Bcu113-cp39-cp39-linux_x86_64.whl torchaudio-${version}-cp39-cp39-linux_x86_64.whl"
"x86_64-linux-37 $linux_bucket/torchaudio-${version}%2Bcu113-cp37-cp37m-linux_x86_64.whl torchaudio-${version}-cp37-cp37m-linux_x86_64.whl"
"x86_64-linux-38 $linux_bucket/torchaudio-${version}%2Bcu113-cp38-cp38-linux_x86_64.whl torchaudio-${version}-cp38-cp38-linux_x86_64.whl"
"x86_64-linux-39 $linux_bucket/torchaudio-${version}%2Bcu113-cp39-cp39-linux_x86_64.whl torchaudio-${version}-cp39-cp39-linux_x86_64.whl"
"x86_64-linux-310 $linux_bucket/torchaudio-${version}%2Bcu113-cp310-cp310-linux_x86_64.whl torchaudio-${version}-cp310-cp310-linux_x86_64.whl"
"x86_64-darwin-37 $darwin_bucket/torchaudio-${version}-cp37-cp37m-macosx_10_15_x86_64.whl torchaudio-${version}-cp37-cp37m-macosx_10_15_x86_64.whl"
"x86_64-darwin-38 $darwin_bucket/torchaudio-${version}-cp38-cp38-macosx_10_15_x86_64.whl torchaudio-${version}-cp38-cp38-macosx_10_15_x86_64.whl"
"x86_64-darwin-39 $darwin_bucket/torchaudio-${version}-cp39-cp39-macosx_10_15_x86_64.whl torchaudio-${version}-cp39-cp39-macosx_10_15_x86_64.whl"
"x86_64-darwin-310 $darwin_bucket/torchaudio-${version}-cp310-cp310-macosx_10_15_x86_64.whl torchaudio-${version}-cp310-cp310-macosx_10_15_x86_64.whl"
"aarch64-darwin-38 $darwin_bucket/torchaudio-${version}-cp38-cp38-macosx_11_0_arm64.whl torchaudio-${version}-cp38-cp38-macosx_11_0_arm64.whl"
"aarch64-darwin-39 $darwin_bucket/torchaudio-${version}-cp39-cp39-macosx_11_0_arm64.whl torchaudio-${version}-cp39-cp39-macosx_11_0_arm64.whl"
"aarch64-darwin-310 $darwin_bucket/torchaudio-${version}-cp310-cp310-macosx_11_0_arm64.whl torchaudio-${version}-cp310-cp310-macosx_11_0_arm64.whl"
)

hashfile=binary-hashes-"$version".nix
Expand Down
5 changes: 3 additions & 2 deletions pkgs/development/python-modules/torchvision/bin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
, isPy37
, isPy38
, isPy39
, isPy310
, patchelf
, pillow
, python
Expand All @@ -15,7 +16,7 @@ let
pyVerNoDot = builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion;
srcs = import ./binary-hashes.nix version;
unsupported = throw "Unsupported system";
version = "0.11.1";
version = "0.12.0";
in buildPythonPackage {
inherit version;

Expand All @@ -25,7 +26,7 @@ in buildPythonPackage {

src = fetchurl srcs."${stdenv.system}-${pyVerNoDot}" or unsupported;

disabled = !(isPy37 || isPy38 || isPy39);
disabled = !(isPy37 || isPy38 || isPy39 || isPy310);

nativeBuildInputs = [
patchelf
Expand Down
Loading