2020-04-24 23:36:52 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
version="2.8.0"
|
2021-05-28 09:39:13 +00:00
|
|
|
|
|
|
|
bucket="https://storage.googleapis.com/tensorflow"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# List of binary wheels for Tensorflow. The most recent versions can be found
|
|
|
|
# on the following page:
|
|
|
|
# https://www.tensorflow.org/install/pip?lang=python3#package-location
|
|
|
|
url_and_key_list=(
|
2021-05-28 09:39:13 +00:00
|
|
|
"linux_py_37_cpu $bucket/linux/cpu/tensorflow_cpu-${version}-cp37-cp37m-manylinux2010_x86_64.whl"
|
|
|
|
"linux_py_38_cpu $bucket/linux/cpu/tensorflow_cpu-${version}-cp38-cp38-manylinux2010_x86_64.whl"
|
2021-12-06 16:07:01 +00:00
|
|
|
"linux_py_39_cpu $bucket/linux/cpu/tensorflow_cpu-${version}-cp39-cp39-manylinux2010_x86_64.whl"
|
2022-04-27 09:35:20 +00:00
|
|
|
"linux_py_310_cpu $bucket/linux/cpu/tensorflow_cpu-${version}-cp310-cp310-manylinux2010_x86_64.whl"
|
2021-05-28 09:39:13 +00:00
|
|
|
"linux_py_37_gpu $bucket/linux/gpu/tensorflow_gpu-${version}-cp37-cp37m-manylinux2010_x86_64.whl"
|
|
|
|
"linux_py_38_gpu $bucket/linux/gpu/tensorflow_gpu-${version}-cp38-cp38-manylinux2010_x86_64.whl"
|
2021-12-06 16:07:01 +00:00
|
|
|
"linux_py_39_gpu $bucket/linux/gpu/tensorflow_gpu-${version}-cp39-cp39-manylinux2010_x86_64.whl"
|
2022-04-27 09:35:20 +00:00
|
|
|
"linux_py_310_gpu $bucket/linux/gpu/tensorflow_gpu-${version}-cp310-cp310-manylinux2010_x86_64.whl"
|
|
|
|
"mac_py_37_cpu $bucket/mac/cpu/tensorflow-${version}-cp37-cp37m-macosx_10_14_x86_64.whl"
|
|
|
|
"mac_py_38_cpu $bucket/mac/cpu/tensorflow-${version}-cp38-cp38-macosx_10_14_x86_64.whl"
|
|
|
|
"mac_py_39_cpu $bucket/mac/cpu/tensorflow-${version}-cp39-cp39-macosx_10_14_x86_64.whl"
|
|
|
|
"mac_py_310_cpu $bucket/mac/cpu/tensorflow-${version}-cp310-cp310-macosx_10_14_x86_64.whl"
|
2020-04-24 23:36:52 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
hashfile=binary-hashes.nix
|
|
|
|
rm -f $hashfile
|
|
|
|
echo "{" >> $hashfile
|
|
|
|
echo "version = \"$version\";" >> $hashfile
|
|
|
|
|
|
|
|
for url_and_key in "${url_and_key_list[@]}"; do
|
|
|
|
key=$(echo "$url_and_key" | cut -d' ' -f1)
|
|
|
|
url=$(echo "$url_and_key" | cut -d' ' -f2)
|
|
|
|
|
|
|
|
echo "prefetching ${url}..."
|
|
|
|
hash=$(nix-prefetch-url $url)
|
|
|
|
|
|
|
|
echo "$key = {" >> $hashfile
|
|
|
|
echo " url = \"$url\";" >> $hashfile
|
|
|
|
echo " sha256 = \"$hash\";" >> $hashfile
|
|
|
|
echo "};" >> $hashfile
|
|
|
|
|
|
|
|
echo
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "}" >> $hashfile
|
|
|
|
echo "done."
|