mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
python311Packages.{torch,torch-bin}: 2.4.1 -> 2.5.0 (#349409)
This commit is contained in:
commit
6bd21841b8
@ -1,29 +0,0 @@
|
||||
From c5d4087519eae6f41c80bbd8ffbcc9390db44c7f Mon Sep 17 00:00:00 2001
|
||||
From: SomeoneSerge <else+aalto@someonex.net>
|
||||
Date: Thu, 10 Oct 2024 19:19:18 +0000
|
||||
Subject: [PATCH] cmake.py: propagate cmakeFlags from environment
|
||||
|
||||
---
|
||||
tools/setup_helpers/cmake.py | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/tools/setup_helpers/cmake.py b/tools/setup_helpers/cmake.py
|
||||
index 4b605fe5975..ea1d6a1ef46 100644
|
||||
--- a/tools/setup_helpers/cmake.py
|
||||
+++ b/tools/setup_helpers/cmake.py
|
||||
@@ -332,6 +332,12 @@ class CMake:
|
||||
file=sys.stderr,
|
||||
)
|
||||
print(e, file=sys.stderr)
|
||||
+
|
||||
+ # Nixpkgs compat:
|
||||
+ if "cmakeFlags" in os.environ:
|
||||
+ import shlex
|
||||
+ args.extend(shlex.split(os.environ["cmakeFlags"]))
|
||||
+
|
||||
# According to the CMake manual, we should pass the arguments first,
|
||||
# and put the directory as the last element. Otherwise, these flags
|
||||
# may not be passed correctly.
|
||||
--
|
||||
2.46.0
|
||||
|
@ -35,7 +35,7 @@ let
|
||||
pyVerNoDot = builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion;
|
||||
srcs = import ./binary-hashes.nix version;
|
||||
unsupported = throw "Unsupported system";
|
||||
version = "2.4.1";
|
||||
version = "2.5.0";
|
||||
in
|
||||
buildPythonPackage {
|
||||
inherit version;
|
||||
@ -45,7 +45,7 @@ buildPythonPackage {
|
||||
|
||||
format = "wheel";
|
||||
|
||||
disabled = (pythonOlder "3.8") || (pythonAtLeast "3.13");
|
||||
disabled = (pythonOlder "3.9") || (pythonAtLeast "3.13");
|
||||
|
||||
src = fetchurl srcs."${stdenv.system}-${pyVerNoDot}" or unsupported;
|
||||
|
||||
|
@ -7,81 +7,66 @@
|
||||
|
||||
version:
|
||||
builtins.getAttr version {
|
||||
"2.4.1" = {
|
||||
x86_64-linux-38 = {
|
||||
name = "torch-2.4.1-cp38-cp38-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu121/torch-2.4.1%2Bcu121-cp38-cp38-linux_x86_64.whl";
|
||||
hash = "sha256-y09QL5ELR+HjZsz3sjHawpZ9LvtH1LjLM/xjtLxe7tg=";
|
||||
};
|
||||
"2.5.0" = {
|
||||
x86_64-linux-39 = {
|
||||
name = "torch-2.4.1-cp39-cp39-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu121/torch-2.4.1%2Bcu121-cp39-cp39-linux_x86_64.whl";
|
||||
hash = "sha256-mYatNVXd//Vekl2CmPiytJEGp9xg+BGiB2pEX+RFjis=";
|
||||
name = "torch-2.5.0-cp39-cp39-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu124/torch-2.5.0%2Bcu124-cp39-cp39-linux_x86_64.whl";
|
||||
hash = "sha256-Z3RdahkVnJ436sN6HAicTZ9ZTNcsIV2mFN9A/OEw3Sc=";
|
||||
};
|
||||
x86_64-linux-310 = {
|
||||
name = "torch-2.4.1-cp310-cp310-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu121/torch-2.4.1%2Bcu121-cp310-cp310-linux_x86_64.whl";
|
||||
hash = "sha256-ml8LEDz+hAs1aEFqpQZ/bnuf7GfZxWWf1DsSB0UP6XU=";
|
||||
name = "torch-2.5.0-cp310-cp310-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu124/torch-2.5.0%2Bcu124-cp310-cp310-linux_x86_64.whl";
|
||||
hash = "sha256-uLcj9Hqgb9/rGnqsXf+PpZlL+qT9PK0GAbvw1bHBUEk=";
|
||||
};
|
||||
x86_64-linux-311 = {
|
||||
name = "torch-2.4.1-cp311-cp311-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu121/torch-2.4.1%2Bcu121-cp311-cp311-linux_x86_64.whl";
|
||||
hash = "sha256-kU0Sjlq8u+ecobnrUxGxhURPGy1xF99VX+QYSH7PuJQ=";
|
||||
name = "torch-2.5.0-cp311-cp311-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu124/torch-2.5.0%2Bcu124-cp311-cp311-linux_x86_64.whl";
|
||||
hash = "sha256-Xj9Ke6gSUXwsFlmFe1GV8oeiiPvQUKWr+TEeA9vhoos=";
|
||||
};
|
||||
x86_64-linux-312 = {
|
||||
name = "torch-2.4.1-cp312-cp312-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu121/torch-2.4.1%2Bcu121-cp312-cp312-linux_x86_64.whl";
|
||||
hash = "sha256-q0kWELFVUeCNp0urKdCTPmvxC6tE+31LEyjx6EXAWlM=";
|
||||
};
|
||||
aarch64-darwin-38 = {
|
||||
name = "torch-2.4.1-cp38-none-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torch-2.4.1-cp38-none-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-X8HU1+0mXvhTV5yvJyaG0e2Hzr3NBPKkmPgA/8U9q3E=";
|
||||
name = "torch-2.5.0-cp312-cp312-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu124/torch-2.5.0%2Bcu124-cp312-cp312-linux_x86_64.whl";
|
||||
hash = "sha256-EcKB2WiMNu3tBq6PYNa5fgEIMe+upKSyJErUNn4jLtc=";
|
||||
};
|
||||
aarch64-darwin-39 = {
|
||||
name = "torch-2.4.1-cp39-none-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torch-2.4.1-cp39-none-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-o43igD7mBQMJqsAyZ2U2w9O2qYBCSFN+OOCY0OFIF+w=";
|
||||
name = "torch-2.5.0-cp39-none-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torch-2.5.0-cp39-none-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-7YScLRFY+FkflMFEeO4cPeq8H0OKAD1VwFdGJMAWJ/E=";
|
||||
};
|
||||
aarch64-darwin-310 = {
|
||||
name = "torch-2.4.1-cp310-none-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torch-2.4.1-cp310-none-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-02qO8QD1v/Ppw86pNLng1+onfLghDHFS00qabFgw6t0=";
|
||||
name = "torch-2.5.0-cp310-none-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torch-2.5.0-cp310-none-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-uK9pC351HUG9Je8uqkauNUqngTgOHk006wMb+oP0tRI=";
|
||||
};
|
||||
aarch64-darwin-311 = {
|
||||
name = "torch-2.4.1-cp311-none-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torch-2.4.1-cp311-none-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-3d29iwZudDk0pCALPVQmekbbAhBodtIc8x99p6lvmOo=";
|
||||
name = "torch-2.5.0-cp311-none-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torch-2.5.0-cp311-none-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-2nchfs0y5UxiSXmVR+7aEF67qow8dFtZGlMg4rwkNYU=";
|
||||
};
|
||||
aarch64-darwin-312 = {
|
||||
name = "torch-2.4.1-cp312-none-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torch-2.4.1-cp312-none-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-crSE1bbOwac1vz+locSIPQF0hpjF6c/b60/6t8eYfg0=";
|
||||
};
|
||||
aarch64-linux-38 = {
|
||||
name = "torch-2.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torch-2.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
|
||||
hash = "sha256-Vq0qdgt6eIJyWh7r9WV6u7O1FE6ya8tHtSBZNXRjxUg=";
|
||||
name = "torch-2.5.0-cp312-none-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torch-2.5.0-cp312-none-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-w6vjoAPA1XgGUi9z1euXdmg2onTYCcnKPrPnXSSIvz4=";
|
||||
};
|
||||
aarch64-linux-39 = {
|
||||
name = "torch-2.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torch-2.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
|
||||
hash = "sha256-FJUTLzD3Iq8aCRlQCIuuo4P+OZA9sGsg5pNv2ZQCgD4=";
|
||||
name = "torch-2.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torch-2.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
|
||||
hash = "sha256-5CMassS3SgvmnicQ4/kRAs55yuCeb7saYe9yRsUHA+Q=";
|
||||
};
|
||||
aarch64-linux-310 = {
|
||||
name = "torch-2.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torch-2.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
|
||||
hash = "sha256-+iewSNMhmM2m6c/wv3aOhoPZh0OQO35dKx9QmN7R00M=";
|
||||
name = "torch-2.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torch-2.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
|
||||
hash = "sha256-UPz/n1ucUQL5+PXLPRK9TZ8SZmUOS4wU9QpexYnh7qU=";
|
||||
};
|
||||
aarch64-linux-311 = {
|
||||
name = "torch-2.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torch-2.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
|
||||
hash = "sha256-ML4oRNDJORYaEQc7+69kXxx8tD9i9GzG5N8cEZ+yp5g=";
|
||||
name = "torch-2.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torch-2.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
|
||||
hash = "sha256-IFoOy/hfTHhXz99Paw4HMWvZKe2SSCVp6PRSRABVmIQ=";
|
||||
};
|
||||
aarch64-linux-312 = {
|
||||
name = "torch-2.4.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torch-2.4.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
|
||||
hash = "sha256-NhCUMrEL1xY8mzDOiW88LMobhrl2X5VqFZTw/0MJHio=";
|
||||
name = "torch-2.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torch-2.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
|
||||
hash = "sha256-V+B/GKTe9Sz+UETKqGG8PeRJcXn67iNvO5V7Qn/80OQ=";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -38,7 +38,7 @@
|
||||
darwin,
|
||||
numactl,
|
||||
|
||||
# Propagated build inputs
|
||||
# dependencies
|
||||
astunparse,
|
||||
fsspec,
|
||||
filelock,
|
||||
@ -87,8 +87,6 @@
|
||||
tensorboard,
|
||||
protobuf,
|
||||
|
||||
pythonOlder,
|
||||
|
||||
# ROCm dependencies
|
||||
rocmSupport ? config.rocmSupport,
|
||||
rocmPackages_5,
|
||||
@ -225,11 +223,9 @@ in
|
||||
buildPythonPackage rec {
|
||||
pname = "torch";
|
||||
# Don't forget to update torch-bin to the same version.
|
||||
version = "2.4.1";
|
||||
version = "2.5.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8.0";
|
||||
|
||||
outputs = [
|
||||
"out" # output standard python package
|
||||
"dev" # output libtorch headers
|
||||
@ -243,17 +239,11 @@ buildPythonPackage rec {
|
||||
repo = "pytorch";
|
||||
rev = "refs/tags/v${version}";
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-x/zM/57syr46CP1TfGaefSjzvNm4jJbWFZGVGyzPMg8=";
|
||||
hash = "sha256-z41VAN4l/6hyHsxNOnJORy5EQK93kSMkDHRVQrdxv7k=";
|
||||
};
|
||||
|
||||
patches =
|
||||
[
|
||||
# Allow setting PYTHON_LIB_REL_PATH with an environment variable.
|
||||
# https://github.com/pytorch/pytorch/pull/128419
|
||||
./passthrough-python-lib-rel-path.patch
|
||||
./0001-cmake.py-propagate-cmakeFlags-from-environment.patch
|
||||
]
|
||||
++ lib.optionals cudaSupport [ ./fix-cmake-cuda-toolkit.patch ]
|
||||
lib.optionals cudaSupport [ ./fix-cmake-cuda-toolkit.patch ]
|
||||
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
|
||||
# pthreadpool added support for Grand Central Dispatch in April
|
||||
# 2020. However, this relies on functionality (DISPATCH_APPLY_AUTO)
|
||||
@ -537,6 +527,9 @@ buildPythonPackage rec {
|
||||
++ lib.optionals MPISupport [ mpi ]
|
||||
++ lib.optionals rocmSupport [ rocmtoolkit_joined ];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"sympy"
|
||||
];
|
||||
dependencies = [
|
||||
astunparse
|
||||
cffi
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff --git a/tools/setup_helpers/cmake.py b/tools/setup_helpers/cmake.py
|
||||
index 5481ce46031c..d50d9d547399 100644
|
||||
--- a/tools/setup_helpers/cmake.py
|
||||
+++ b/tools/setup_helpers/cmake.py
|
||||
@@ -231,6 +231,7 @@ def generate(
|
||||
"SELECTED_OP_LIST",
|
||||
"TORCH_CUDA_ARCH_LIST",
|
||||
"TRACING_BASED",
|
||||
+ "PYTHON_LIB_REL_PATH",
|
||||
)
|
||||
}
|
||||
)
|
@ -5,23 +5,20 @@ set -eou pipefail
|
||||
|
||||
version=$1
|
||||
|
||||
linux_cuda_version="cu121"
|
||||
linux_cuda_version="cu124"
|
||||
linux_cuda_bucket="https://download.pytorch.org/whl/${linux_cuda_version}"
|
||||
linux_cpu_bucket="https://download.pytorch.org/whl/cpu"
|
||||
darwin_bucket="https://download.pytorch.org/whl/cpu"
|
||||
|
||||
url_and_key_list=(
|
||||
"x86_64-linux-38 $linux_cuda_bucket/torch-${version}%2B${linux_cuda_version}-cp38-cp38-linux_x86_64.whl torch-${version}-cp38-cp38-linux_x86_64.whl"
|
||||
"x86_64-linux-39 $linux_cuda_bucket/torch-${version}%2B${linux_cuda_version}-cp39-cp39-linux_x86_64.whl torch-${version}-cp39-cp39-linux_x86_64.whl"
|
||||
"x86_64-linux-310 $linux_cuda_bucket/torch-${version}%2B${linux_cuda_version}-cp310-cp310-linux_x86_64.whl torch-${version}-cp310-cp310-linux_x86_64.whl"
|
||||
"x86_64-linux-311 $linux_cuda_bucket/torch-${version}%2B${linux_cuda_version}-cp311-cp311-linux_x86_64.whl torch-${version}-cp311-cp311-linux_x86_64.whl"
|
||||
"x86_64-linux-312 $linux_cuda_bucket/torch-${version}%2B${linux_cuda_version}-cp312-cp312-linux_x86_64.whl torch-${version}-cp312-cp312-linux_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"
|
||||
"aarch64-darwin-311 $darwin_bucket/torch-${version}-cp311-none-macosx_11_0_arm64.whl torch-${version}-cp311-none-macosx_11_0_arm64.whl"
|
||||
"aarch64-darwin-312 $darwin_bucket/torch-${version}-cp312-none-macosx_11_0_arm64.whl torch-${version}-cp312-none-macosx_11_0_arm64.whl"
|
||||
"aarch64-linux-38 $linux_cpu_bucket/torch-${version}-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl torch-${version}-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl"
|
||||
"aarch64-linux-39 $linux_cpu_bucket/torch-${version}-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl torch-${version}-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl"
|
||||
"aarch64-linux-310 $linux_cpu_bucket/torch-${version}-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl torch-${version}-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl"
|
||||
"aarch64-linux-311 $linux_cpu_bucket/torch-${version}-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl torch-${version}-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl"
|
||||
@ -37,7 +34,7 @@ for url_and_key in "${url_and_key_list[@]}"; do
|
||||
name=$(echo "$url_and_key" | cut -d' ' -f3)
|
||||
|
||||
echo "prefetching ${url}..."
|
||||
hash=$(nix hash to-sri --type sha256 `nix-prefetch-url "$url" --name "$name"`)
|
||||
hash=$(nix hash convert --hash-algo sha256 `nix-prefetch-url "$url" --name "$name"`)
|
||||
|
||||
echo " $key = {" >> $hashfile
|
||||
echo " name = \"$name\";" >> $hashfile
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "torchaudio";
|
||||
version = "2.4.1";
|
||||
version = "2.5.0";
|
||||
format = "wheel";
|
||||
|
||||
src =
|
||||
@ -33,7 +33,7 @@ buildPythonPackage rec {
|
||||
in
|
||||
fetchurl srcs;
|
||||
|
||||
disabled = (pythonOlder "3.8") || (pythonAtLeast "3.13");
|
||||
disabled = (pythonOlder "3.9") || (pythonAtLeast "3.13");
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
|
@ -7,81 +7,66 @@
|
||||
|
||||
version:
|
||||
builtins.getAttr version {
|
||||
"2.4.1" = {
|
||||
x86_64-linux-38 = {
|
||||
name = "torchaudio-2.4.1-cp38-cp38-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu121/torchaudio-2.4.1%2Bcu121-cp38-cp38-linux_x86_64.whl";
|
||||
hash = "sha256-/PvxFpkpX2WwRYHNBDcv4CojmAbrfSXaJ0bzXeD10tk=";
|
||||
};
|
||||
"2.5.0" = {
|
||||
x86_64-linux-39 = {
|
||||
name = "torchaudio-2.4.1-cp39-cp39-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu121/torchaudio-2.4.1%2Bcu121-cp39-cp39-linux_x86_64.whl";
|
||||
hash = "sha256-cbuwbBAYeZ2zoLzAlN0IuAvCi7e18nq4sOLziwFLEcY=";
|
||||
name = "torchaudio-2.5.0-cp39-cp39-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu124/torchaudio-2.5.0%2Bcu124-cp39-cp39-linux_x86_64.whl";
|
||||
hash = "sha256-EPFw0hJ5l68BebIfOHjJiR54Sx5VtWNsHRnfq1tSYlU=";
|
||||
};
|
||||
x86_64-linux-310 = {
|
||||
name = "torchaudio-2.4.1-cp310-cp310-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu121/torchaudio-2.4.1%2Bcu121-cp310-cp310-linux_x86_64.whl";
|
||||
hash = "sha256-2oyHyAocE3akjcM+7zCwO73x3yWgW9KxxiC4gRx7Gb4=";
|
||||
name = "torchaudio-2.5.0-cp310-cp310-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu124/torchaudio-2.5.0%2Bcu124-cp310-cp310-linux_x86_64.whl";
|
||||
hash = "sha256-PV0jpAEMHbJGhC+ahhHNK4teEQ1dR3jME9pZfvfDqV8=";
|
||||
};
|
||||
x86_64-linux-311 = {
|
||||
name = "torchaudio-2.4.1-cp311-cp311-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu121/torchaudio-2.4.1%2Bcu121-cp311-cp311-linux_x86_64.whl";
|
||||
hash = "sha256-AbBO25E1p9YPoBAPwB/7QKCFgBD1ma5kGPQOCeiOaBs=";
|
||||
name = "torchaudio-2.5.0-cp311-cp311-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu124/torchaudio-2.5.0%2Bcu124-cp311-cp311-linux_x86_64.whl";
|
||||
hash = "sha256-Y+Qe6UgenV9ViG2tBHPsTuIhKl5Ruc1lU/2dWKYvZ+E=";
|
||||
};
|
||||
x86_64-linux-312 = {
|
||||
name = "torchaudio-2.4.1-cp312-cp312-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu121/torchaudio-2.4.1%2Bcu121-cp312-cp312-linux_x86_64.whl";
|
||||
hash = "sha256-a3TXBquoHbX4OMpBTwPT9lmOqIC3IQYGXbycXTwGP+E=";
|
||||
};
|
||||
aarch64-darwin-38 = {
|
||||
name = "torchaudio-2.4.1-cp38-cp38-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.4.1-cp38-cp38-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-TqD9ABQv55XHW8wgowOYG1byMnx/fTIbQqj+8deKr6k=";
|
||||
name = "torchaudio-2.5.0-cp312-cp312-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu124/torchaudio-2.5.0%2Bcu124-cp312-cp312-linux_x86_64.whl";
|
||||
hash = "sha256-qSgxhlE7+HATg8a8w+1tYk2kK7/WLzHHJrmulH9R7zc=";
|
||||
};
|
||||
aarch64-darwin-39 = {
|
||||
name = "torchaudio-2.4.1-cp39-cp39-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.4.1-cp39-cp39-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-OtzlUIUJArmqbNI3jM1yCsnsjPMeLrqXQ8zIT/y+dtY=";
|
||||
name = "torchaudio-2.5.0-cp39-cp39-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.5.0-cp39-cp39-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-hVc/ZtwJSX0oK79Abo8rA+WSnrO9wfdqnZvEZkTUB7E=";
|
||||
};
|
||||
aarch64-darwin-310 = {
|
||||
name = "torchaudio-2.4.1-cp310-cp310-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.4.1-cp310-cp310-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-ZhkJdRkJNAsk9jdBDf7AKoiIZ4FsPbGe1PQQKuEFJEo=";
|
||||
name = "torchaudio-2.5.0-cp310-cp310-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.5.0-cp310-cp310-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-q2m9/rRDQVnhaKSiwWGNHWWloUqR0X0hJW6pYPM0Bf0=";
|
||||
};
|
||||
aarch64-darwin-311 = {
|
||||
name = "torchaudio-2.4.1-cp311-cp311-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.4.1-cp311-cp311-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-YK8VMYFdImWeVBLqQBvtVSoWw4mTjElmTkRuTP1d3AY=";
|
||||
name = "torchaudio-2.5.0-cp311-cp311-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.5.0-cp311-cp311-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-mC7ASUonx/Pn5oyRzJLm4a1vhv7e7sYnCWBRMJYysUk=";
|
||||
};
|
||||
aarch64-darwin-312 = {
|
||||
name = "torchaudio-2.4.1-cp312-cp312-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.4.1-cp312-cp312-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-lTlGz2EP/Ve7P90ijv+iES+lHF3+NqlmEe/8kHSj074=";
|
||||
};
|
||||
aarch64-linux-38 = {
|
||||
name = "torchaudio-2.4.1-cp38-cp38-manylinux2014_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.4.1-cp38-cp38-linux_aarch64.whl";
|
||||
hash = "sha256-dNGc+co9rTlK/Ku35vftmrn1nyVA1QKCbH7D4zmFJR0=";
|
||||
name = "torchaudio-2.5.0-cp312-cp312-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.5.0-cp312-cp312-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-yDXadxcBsG++jhnOZD1eWH/TheX02PFAVRzgSQCxuWs=";
|
||||
};
|
||||
aarch64-linux-39 = {
|
||||
name = "torchaudio-2.4.1-cp39-cp39-manylinux2014_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.4.1-cp39-cp39-linux_aarch64.whl";
|
||||
hash = "sha256-NsfnvGs1jL9Ct2nIAgZ4D6FJfRQamFxrPndo3kRSTpo=";
|
||||
name = "torchaudio-2.5.0-cp39-cp39-manylinux2014_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.5.0-cp39-cp39-linux_aarch64.whl";
|
||||
hash = "sha256-qr+MTOkZwuJKzklkHqQpNgAYgWNxo9RwQn/AKrERVsU=";
|
||||
};
|
||||
aarch64-linux-310 = {
|
||||
name = "torchaudio-2.4.1-cp310-cp310-manylinux2014_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.4.1-cp310-cp310-linux_aarch64.whl";
|
||||
hash = "sha256-VEMRedmpzPP+6umKrOB9ifrp/XKOK8hlbvvXDn7cxvg=";
|
||||
name = "torchaudio-2.5.0-cp310-cp310-manylinux2014_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.5.0-cp310-cp310-linux_aarch64.whl";
|
||||
hash = "sha256-nf7tzvPkMBDz7C2ATI9i/kmrCe8cGeZzYyWTlmGik70=";
|
||||
};
|
||||
aarch64-linux-311 = {
|
||||
name = "torchaudio-2.4.1-cp311-cp311-manylinux2014_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.4.1-cp311-cp311-linux_aarch64.whl";
|
||||
hash = "sha256-dkCq/7IFbhLykGGHsDoiIooJCMh9ApX930sLkjNKKQs=";
|
||||
name = "torchaudio-2.5.0-cp311-cp311-manylinux2014_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.5.0-cp311-cp311-linux_aarch64.whl";
|
||||
hash = "sha256-w1IB79KCRBUtbtvekndcEPOfWl2TRiAvB7FVTceNJaI=";
|
||||
};
|
||||
aarch64-linux-312 = {
|
||||
name = "torchaudio-2.4.1-cp312-cp312-manylinux2014_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.4.1-cp312-cp312-linux_aarch64.whl";
|
||||
hash = "sha256-W2L8exbtcIsMB9Q5MTd5fpL2P8O9VwVgfZe6app88/A=";
|
||||
name = "torchaudio-2.5.0-cp312-cp312-manylinux2014_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.5.0-cp312-cp312-linux_aarch64.whl";
|
||||
hash = "sha256-WTJY8z3h+hbr5XGMlxfa82lUYNSKAYgZSlxXSnEIOMs=";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -76,14 +76,14 @@ let
|
||||
in
|
||||
buildPythonPackage rec {
|
||||
pname = "torchaudio";
|
||||
version = "2.4.1";
|
||||
version = "2.5.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pytorch";
|
||||
repo = "audio";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-zQqIIzOW9vboP5XQSOUWB0edz6XJvz06RqbcYPO9K24=";
|
||||
hash = "sha256-Swh+HnkGRzjQFt9mYO+qBq4BDTbmLGSkOrN2ZUQdNUI=";
|
||||
};
|
||||
|
||||
patches = [ ./0001-setup.py-propagate-cmakeFlags.patch ];
|
||||
|
@ -5,23 +5,20 @@ set -eou pipefail
|
||||
|
||||
version=$1
|
||||
|
||||
linux_cuda_version="cu121"
|
||||
linux_cuda_version="cu124"
|
||||
linux_cuda_bucket="https://download.pytorch.org/whl/${linux_cuda_version}"
|
||||
linux_cpu_bucket="https://download.pytorch.org/whl/cpu"
|
||||
darwin_bucket="https://download.pytorch.org/whl/cpu"
|
||||
|
||||
url_and_key_list=(
|
||||
"x86_64-linux-38 $linux_cuda_bucket/torchaudio-${version}%2B${linux_cuda_version}-cp38-cp38-linux_x86_64.whl torchaudio-${version}-cp38-cp38-linux_x86_64.whl"
|
||||
"x86_64-linux-39 $linux_cuda_bucket/torchaudio-${version}%2B${linux_cuda_version}-cp39-cp39-linux_x86_64.whl torchaudio-${version}-cp39-cp39-linux_x86_64.whl"
|
||||
"x86_64-linux-310 $linux_cuda_bucket/torchaudio-${version}%2B${linux_cuda_version}-cp310-cp310-linux_x86_64.whl torchaudio-${version}-cp310-cp310-linux_x86_64.whl"
|
||||
"x86_64-linux-311 $linux_cuda_bucket/torchaudio-${version}%2B${linux_cuda_version}-cp311-cp311-linux_x86_64.whl torchaudio-${version}-cp311-cp311-linux_x86_64.whl"
|
||||
"x86_64-linux-312 $linux_cuda_bucket/torchaudio-${version}%2B${linux_cuda_version}-cp312-cp312-linux_x86_64.whl torchaudio-${version}-cp312-cp312-linux_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"
|
||||
"aarch64-darwin-311 $darwin_bucket/torchaudio-${version}-cp311-cp311-macosx_11_0_arm64.whl torchaudio-${version}-cp311-cp311-macosx_11_0_arm64.whl"
|
||||
"aarch64-darwin-312 $darwin_bucket/torchaudio-${version}-cp312-cp312-macosx_11_0_arm64.whl torchaudio-${version}-cp312-cp312-macosx_11_0_arm64.whl"
|
||||
"aarch64-linux-38 $linux_cpu_bucket/torchaudio-${version}-cp38-cp38-linux_aarch64.whl torchaudio-${version}-cp38-cp38-manylinux2014_aarch64.whl"
|
||||
"aarch64-linux-39 $linux_cpu_bucket/torchaudio-${version}-cp39-cp39-linux_aarch64.whl torchaudio-${version}-cp39-cp39-manylinux2014_aarch64.whl"
|
||||
"aarch64-linux-310 $linux_cpu_bucket/torchaudio-${version}-cp310-cp310-linux_aarch64.whl torchaudio-${version}-cp310-cp310-manylinux2014_aarch64.whl"
|
||||
"aarch64-linux-311 $linux_cpu_bucket/torchaudio-${version}-cp311-cp311-linux_aarch64.whl torchaudio-${version}-cp311-cp311-manylinux2014_aarch64.whl"
|
||||
@ -37,7 +34,7 @@ for url_and_key in "${url_and_key_list[@]}"; do
|
||||
name=$(echo "$url_and_key" | cut -d' ' -f3)
|
||||
|
||||
echo "prefetching ${url}..."
|
||||
hash=$(nix hash to-sri --type sha256 $(nix-prefetch-url "$url" --name "$name"))
|
||||
hash=$(nix hash convert --hash-algo sha256 $(nix-prefetch-url "$url" --name "$name"))
|
||||
|
||||
echo " $key = {" >>$hashfile
|
||||
echo " name = \"$name\";" >>$hashfile
|
||||
|
@ -23,7 +23,7 @@ let
|
||||
pyVerNoDot = builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion;
|
||||
srcs = import ./binary-hashes.nix version;
|
||||
unsupported = throw "Unsupported system";
|
||||
version = "0.19.1";
|
||||
version = "0.20.0";
|
||||
in
|
||||
buildPythonPackage {
|
||||
inherit version;
|
||||
@ -34,7 +34,7 @@ buildPythonPackage {
|
||||
|
||||
src = fetchurl srcs."${stdenv.system}-${pyVerNoDot}" or unsupported;
|
||||
|
||||
disabled = (pythonOlder "3.8") || (pythonAtLeast "3.13");
|
||||
disabled = (pythonOlder "3.9") || (pythonAtLeast "3.13");
|
||||
|
||||
# Note that we don't rely on config.cudaSupport here, because the Linux wheels all come built with CUDA support.
|
||||
buildInputs =
|
||||
|
@ -7,81 +7,66 @@
|
||||
|
||||
version:
|
||||
builtins.getAttr version {
|
||||
"0.19.1" = {
|
||||
x86_64-linux-38 = {
|
||||
name = "torchvision-0.19.1-cp38-cp38-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu121/torchvision-0.19.1%2Bcu121-cp38-cp38-linux_x86_64.whl";
|
||||
hash = "sha256-MFL5ci3Dn9fwJrRKb73vk6so95UgBwEs6E0xPWeWQBE=";
|
||||
};
|
||||
"0.20.0" = {
|
||||
x86_64-linux-39 = {
|
||||
name = "torchvision-0.19.1-cp39-cp39-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu121/torchvision-0.19.1%2Bcu121-cp39-cp39-linux_x86_64.whl";
|
||||
hash = "sha256-FFMN7gzEx8BgJPC9zJV/d94NK5DptyIZ3NYh+ilSXQA=";
|
||||
name = "torchvision-0.20.0-cp39-cp39-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu124/torchvision-0.20.0%2Bcu124-cp39-cp39-linux_x86_64.whl";
|
||||
hash = "sha256-UP9Puz3JlN21FK7WvZLJDMF1sWjGWYg4014qxTqaCos=";
|
||||
};
|
||||
x86_64-linux-310 = {
|
||||
name = "torchvision-0.19.1-cp310-cp310-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu121/torchvision-0.19.1%2Bcu121-cp310-cp310-linux_x86_64.whl";
|
||||
hash = "sha256-uMxL84G3VSKZW2AeB6G0M7X9kl3D40p/ps0i9EnWU3k=";
|
||||
name = "torchvision-0.20.0-cp310-cp310-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu124/torchvision-0.20.0%2Bcu124-cp310-cp310-linux_x86_64.whl";
|
||||
hash = "sha256-k5Ni8WH31mqPKrExODqzeZhFjjCO4sYsnRzSdR37KEI=";
|
||||
};
|
||||
x86_64-linux-311 = {
|
||||
name = "torchvision-0.19.1-cp311-cp311-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu121/torchvision-0.19.1%2Bcu121-cp311-cp311-linux_x86_64.whl";
|
||||
hash = "sha256-U2QXNAaUspzFTDCFB9CYsAy9zB/oaAcqNLVTvtc9nTA=";
|
||||
name = "torchvision-0.20.0-cp311-cp311-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu124/torchvision-0.20.0%2Bcu124-cp311-cp311-linux_x86_64.whl";
|
||||
hash = "sha256-O0R4ODFuAqqSFSklZbp5wT0//rBjGgkAxby4uB7iJtc=";
|
||||
};
|
||||
x86_64-linux-312 = {
|
||||
name = "torchvision-0.19.1-cp312-cp312-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu121/torchvision-0.19.1%2Bcu121-cp312-cp312-linux_x86_64.whl";
|
||||
hash = "sha256-+wzQYi40nfhK1zutjrvqaxx08DPa3YTZqAz0opGSfq4=";
|
||||
};
|
||||
aarch64-darwin-38 = {
|
||||
name = "torchvision-0.19.1-cp38-cp38-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchvision-0.19.1-cp38-cp38-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-TE5PWyTqawh7Au1JKrHiG7ozUsRXfi3vFCSM/GBzIzg=";
|
||||
name = "torchvision-0.20.0-cp312-cp312-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu124/torchvision-0.20.0%2Bcu124-cp312-cp312-linux_x86_64.whl";
|
||||
hash = "sha256-hGajClfLUfO0GtC+QKxc8/GijZMnMKHEEWyD0yHQfjw=";
|
||||
};
|
||||
aarch64-darwin-39 = {
|
||||
name = "torchvision-0.19.1-cp39-cp39-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchvision-0.19.1-cp39-cp39-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-cx9DTZFYZ2niVbXXDtGkRX4KE5SpX0qs8OHn4h+AwJg=";
|
||||
name = "torchvision-0.20.0-cp39-cp39-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchvision-0.20.0-cp39-cp39-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-anDIHqUGjdex40Dr6rtlNkV22LmBlFTP34EikM8D5Fo=";
|
||||
};
|
||||
aarch64-darwin-310 = {
|
||||
name = "torchvision-0.19.1-cp310-cp310-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchvision-0.19.1-cp310-cp310-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-VOhRMJnm9YY1bHD4CdNPORr3GtGC/gccwyiiivLEBgg=";
|
||||
name = "torchvision-0.20.0-cp310-cp310-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchvision-0.20.0-cp310-cp310-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-8WTVRZZRhv/WYBTjSpZnBtEshBmDAt1GdIyuRZhGCaQ=";
|
||||
};
|
||||
aarch64-darwin-311 = {
|
||||
name = "torchvision-0.19.1-cp311-cp311-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchvision-0.19.1-cp311-cp311-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-QFFCgrSJbWJ2W44m1wkcMuF8NYF9AOxL4jYuo7o9F4c=";
|
||||
name = "torchvision-0.20.0-cp311-cp311-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchvision-0.20.0-cp311-cp311-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-oV3mJmo2vNENifbz17pOLdVnp6Ct1hbrxuZa6iB5Dl0=";
|
||||
};
|
||||
aarch64-darwin-312 = {
|
||||
name = "torchvision-0.19.1-cp312-cp312-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchvision-0.19.1-cp312-cp312-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-J+zid/8PbNx/7QYnJ5xjLcsuWBh9p3HsoksPvPP4WQ0=";
|
||||
};
|
||||
aarch64-linux-38 = {
|
||||
name = "torchvision-0.19.1-cp38-cp38-linux_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchvision-0.19.1-cp38-cp38-linux_aarch64.whl";
|
||||
hash = "sha256-TRC8kIPE1frdft17cpcAp75I2rT2InjfO8c/pI5IoVU=";
|
||||
name = "torchvision-0.20.0-cp312-cp312-macosx_11_0_arm64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchvision-0.20.0-cp312-cp312-macosx_11_0_arm64.whl";
|
||||
hash = "sha256-rA7bpTT7BxsrA6L9XLv5t8JZiW0XodDYMLPFt9+uB4I=";
|
||||
};
|
||||
aarch64-linux-39 = {
|
||||
name = "torchvision-0.19.1-cp39-cp39-linux_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchvision-0.19.1-cp39-cp39-linux_aarch64.whl";
|
||||
hash = "sha256-4ygwm4ZwouiJsv52ocJ0SgmcEcmE2pqCI1e9nevWmaU=";
|
||||
name = "torchvision-0.20.0-cp39-cp39-linux_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchvision-0.20.0-cp39-cp39-linux_aarch64.whl";
|
||||
hash = "sha256-jWzqirC/cuy3GwfND+g26s9aX6mPZinSJhIS6Ql3uWM=";
|
||||
};
|
||||
aarch64-linux-310 = {
|
||||
name = "torchvision-0.19.1-cp310-cp310-linux_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchvision-0.19.1-cp310-cp310-linux_aarch64.whl";
|
||||
hash = "sha256-ewYxFhZL5S/G3rR2Lef4yQv6OmX41crxf44tWq3HWgQ=";
|
||||
name = "torchvision-0.20.0-cp310-cp310-linux_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchvision-0.20.0-cp310-cp310-linux_aarch64.whl";
|
||||
hash = "sha256-4IT1Dsvb56nML8UeoDZ641/eRuhKlkv0BGyxx/634+Y=";
|
||||
};
|
||||
aarch64-linux-311 = {
|
||||
name = "torchvision-0.19.1-cp311-cp311-linux_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchvision-0.19.1-cp311-cp311-linux_aarch64.whl";
|
||||
hash = "sha256-1xpqb+OlKByjSH1MVq1KrSD/cPgvHXx5vLbnsMKvAMg=";
|
||||
name = "torchvision-0.20.0-cp311-cp311-linux_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchvision-0.20.0-cp311-cp311-linux_aarch64.whl";
|
||||
hash = "sha256-Vdf0PvkS68TaS7pzoLvzh9OKa+nNUhZ5wPQFb5Vktpg=";
|
||||
};
|
||||
aarch64-linux-312 = {
|
||||
name = "torchvision-0.19.1-cp312-cp312-linux_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchvision-0.19.1-cp312-cp312-linux_aarch64.whl";
|
||||
hash = "sha256-wHv0PCoUXXkuzZ0FA9bHNXcUfs5QjUVgDYqsd+TN/Pk=";
|
||||
name = "torchvision-0.20.0-cp312-cp312-linux_aarch64.whl";
|
||||
url = "https://download.pytorch.org/whl/cpu/torchvision-0.20.0-cp312-cp312-linux_aarch64.whl";
|
||||
hash = "sha256-+NAhNIms+xODafJFWmiTiAwZSoGV44HBn4crJ38mVMM=";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ let
|
||||
inherit (cudaPackages) backendStdenv;
|
||||
|
||||
pname = "torchvision";
|
||||
version = "0.19.1";
|
||||
version = "0.20.0";
|
||||
in
|
||||
buildPythonPackage {
|
||||
inherit pname version;
|
||||
@ -35,7 +35,7 @@ buildPythonPackage {
|
||||
owner = "pytorch";
|
||||
repo = "vision";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-UMBFR/Vw13A+bBfr0p3rRwpCRVMq+ihdlG3C/iuOC30=";
|
||||
hash = "sha256-aQ1HhWtkhA2EYPCV2vEW10kcP0m0TLNsgjA0Yiwpm9U=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -5,22 +5,19 @@ set -eou pipefail
|
||||
|
||||
version=$1
|
||||
|
||||
linux_cuda_version="cu121"
|
||||
linux_cuda_version="cu124"
|
||||
linux_bucket="https://download.pytorch.org/whl/${linux_cuda_version}"
|
||||
darwin_bucket="https://download.pytorch.org/whl/cpu"
|
||||
|
||||
url_and_key_list=(
|
||||
"x86_64-linux-38 $linux_bucket/torchvision-${version}%2B${linux_cuda_version}-cp38-cp38-linux_x86_64.whl torchvision-${version}-cp38-cp38-linux_x86_64.whl"
|
||||
"x86_64-linux-39 $linux_bucket/torchvision-${version}%2B${linux_cuda_version}-cp39-cp39-linux_x86_64.whl torchvision-${version}-cp39-cp39-linux_x86_64.whl"
|
||||
"x86_64-linux-310 $linux_bucket/torchvision-${version}%2B${linux_cuda_version}-cp310-cp310-linux_x86_64.whl torchvision-${version}-cp310-cp310-linux_x86_64.whl"
|
||||
"x86_64-linux-311 $linux_bucket/torchvision-${version}%2B${linux_cuda_version}-cp311-cp311-linux_x86_64.whl torchvision-${version}-cp311-cp311-linux_x86_64.whl"
|
||||
"x86_64-linux-312 $linux_bucket/torchvision-${version}%2B${linux_cuda_version}-cp312-cp312-linux_x86_64.whl torchvision-${version}-cp312-cp312-linux_x86_64.whl"
|
||||
"aarch64-darwin-38 $darwin_bucket/torchvision-${version}-cp38-cp38-macosx_11_0_arm64.whl torchvision-${version}-cp38-cp38-macosx_11_0_arm64.whl"
|
||||
"aarch64-darwin-39 $darwin_bucket/torchvision-${version}-cp39-cp39-macosx_11_0_arm64.whl torchvision-${version}-cp39-cp39-macosx_11_0_arm64.whl"
|
||||
"aarch64-darwin-310 $darwin_bucket/torchvision-${version}-cp310-cp310-macosx_11_0_arm64.whl torchvision-${version}-cp310-cp310-macosx_11_0_arm64.whl"
|
||||
"aarch64-darwin-311 $darwin_bucket/torchvision-${version}-cp311-cp311-macosx_11_0_arm64.whl torchvision-${version}-cp311-cp311-macosx_11_0_arm64.whl"
|
||||
"aarch64-darwin-312 $darwin_bucket/torchvision-${version}-cp312-cp312-macosx_11_0_arm64.whl torchvision-${version}-cp312-cp312-macosx_11_0_arm64.whl"
|
||||
"aarch64-linux-38 $darwin_bucket/torchvision-${version}-cp38-cp38-linux_aarch64.whl torchvision-${version}-cp38-cp38-linux_aarch64.whl"
|
||||
"aarch64-linux-39 $darwin_bucket/torchvision-${version}-cp39-cp39-linux_aarch64.whl torchvision-${version}-cp39-cp39-linux_aarch64.whl"
|
||||
"aarch64-linux-310 $darwin_bucket/torchvision-${version}-cp310-cp310-linux_aarch64.whl torchvision-${version}-cp310-cp310-linux_aarch64.whl"
|
||||
"aarch64-linux-311 $darwin_bucket/torchvision-${version}-cp311-cp311-linux_aarch64.whl torchvision-${version}-cp311-cp311-linux_aarch64.whl"
|
||||
@ -36,7 +33,7 @@ for url_and_key in "${url_and_key_list[@]}"; do
|
||||
name=$(echo "$url_and_key" | cut -d' ' -f3)
|
||||
|
||||
echo "prefetching ${url}..."
|
||||
hash=$(nix hash to-sri --type sha256 `nix-prefetch-url "$url" --name "$name"`)
|
||||
hash=$(nix hash convert --hash-algo sha256 `nix-prefetch-url "$url" --name "$name"`)
|
||||
|
||||
echo " $key = {" >> $hashfile
|
||||
echo " name = \"$name\";" >> $hashfile
|
||||
|
Loading…
Reference in New Issue
Block a user