at 22.05-pre 1.6 kB view raw
1#!/usr/bin/env bash 2 3version="2.4.0" 4 5bucket="https://storage.googleapis.com/tensorflow" 6 7# List of binary wheels for Tensorflow. The most recent versions can be found 8# on the following page: 9# https://www.tensorflow.org/install/pip?lang=python3#package-location 10url_and_key_list=( 11"linux_py_36_cpu $bucket/linux/cpu/tensorflow_cpu-${version}-cp36-cp36m-manylinux2010_x86_64.whl" 12"linux_py_37_cpu $bucket/linux/cpu/tensorflow_cpu-${version}-cp37-cp37m-manylinux2010_x86_64.whl" 13"linux_py_38_cpu $bucket/linux/cpu/tensorflow_cpu-${version}-cp38-cp38-manylinux2010_x86_64.whl" 14"linux_py_36_gpu $bucket/linux/gpu/tensorflow_gpu-${version}-cp36-cp36m-manylinux2010_x86_64.whl" 15"linux_py_37_gpu $bucket/linux/gpu/tensorflow_gpu-${version}-cp37-cp37m-manylinux2010_x86_64.whl" 16"linux_py_38_gpu $bucket/linux/gpu/tensorflow_gpu-${version}-cp38-cp38-manylinux2010_x86_64.whl" 17"mac_py_36_cpu $bucket/mac/cpu/tensorflow-${version}-cp36-cp36m-macosx_10_14_x86_64.whl" 18"mac_py_37_cpu $bucket/mac/cpu/tensorflow-${version}-cp37-cp37m-macosx_10_14_x86_64.whl" 19"mac_py_38_cpu $bucket/mac/cpu/tensorflow-${version}-cp38-cp38-macosx_10_14_x86_64.whl" 20) 21 22hashfile=binary-hashes.nix 23rm -f $hashfile 24echo "{" >> $hashfile 25echo "version = \"$version\";" >> $hashfile 26 27for url_and_key in "${url_and_key_list[@]}"; do 28 key=$(echo "$url_and_key" | cut -d' ' -f1) 29 url=$(echo "$url_and_key" | cut -d' ' -f2) 30 31 echo "prefetching ${url}..." 32 hash=$(nix-prefetch-url $url) 33 34 echo "$key = {" >> $hashfile 35 echo " url = \"$url\";" >> $hashfile 36 echo " sha256 = \"$hash\";" >> $hashfile 37 echo "};" >> $hashfile 38 39 echo 40done 41 42echo "}" >> $hashfile 43echo "done."