1 #!/usr/bin/env nix-shell
2 #!nix-shell -i bash -p nix-prefetch-scripts
8 linux_bucket
="https://download.pytorch.org/whl"
11 "x86_64-linux-38 $linux_bucket/triton-${version}-0-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl triton-${version}-cp38-cp38-linux_x86_64.whl"
12 "x86_64-linux-39 $linux_bucket/triton-${version}-0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl triton-${version}-cp39-cp39-linux_x86_64.whl"
13 "x86_64-linux-310 $linux_bucket/triton-${version}-0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl triton-${version}-cp310-cp310-linux_x86_64.whl"
14 "x86_64-linux-311 $linux_bucket/triton-${version}-0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl triton-${version}-cp311-cp311-linux_x86_64.whl"
17 hashfile
=binary-hashes-
"$version".nix
18 echo " \"$version\" = {" >> $hashfile
20 for url_and_key
in "${url_and_key_list[@]}"; do
21 key
=$
(echo "$url_and_key" | cut
-d' ' -f1)
22 url
=$
(echo "$url_and_key" | cut
-d' ' -f2)
23 name
=$
(echo "$url_and_key" | cut
-d' ' -f3)
25 echo "prefetching ${url}..."
26 hash=$
(nix
hash to-sri
--type sha256
`nix-prefetch-url "$url" --name "$name"`)
28 cat << EOF >> $hashfile
39 echo " };" >> $hashfile