Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 44 lines 2.3 kB view raw
1#!/usr/bin/env bash 2 3version=2.1.0 4 5# List of binary wheels for Tensorflow. The most recent versions can be found 6# on the following page: 7# https://www.tensorflow.org/install/pip?lang=python3#package-location 8url_and_key_list=( 9 "linux_py_27_gpu https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-${version}-cp27-cp27mu-manylinux2010_x86_64.whl" 10 "linux_py_27_cpu https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-${version}-cp27-cp27mu-manylinux2010_x86_64.whl" 11 "linux_py_35_gpu https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-${version}-cp35-cp35m-manylinux2010_x86_64.whl" 12 "linux_py_35_cpu https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-${version}-cp35-cp35m-manylinux2010_x86_64.whl" 13 "linux_py_36_gpu https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-${version}-cp36-cp36m-manylinux2010_x86_64.whl" 14 "linux_py_36_cpu https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-${version}-cp36-cp36m-manylinux2010_x86_64.whl" 15 "linux_py_37_gpu https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-${version}-cp37-cp37m-manylinux2010_x86_64.whl" 16 "linux_py_37_cpu https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-${version}-cp37-cp37m-manylinux2010_x86_64.whl" 17 "mac_py_27_cpu https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-${version}-cp27-cp27m-macosx_10_9_x86_64.whl" 18 "mac_py_35_cpu https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-${version}-cp35-cp35m-macosx_10_6_intel.whl" 19 "mac_py_36_cpu https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-${version}-cp36-cp36m-macosx_10_9_x86_64.whl" 20 "mac_py_37_cpu https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-${version}-cp37-cp37m-macosx_10_9_x86_64.whl" 21) 22 23hashfile=binary-hashes.nix 24rm -f $hashfile 25echo "{" >> $hashfile 26echo "version = \"$version\";" >> $hashfile 27 28for url_and_key in "${url_and_key_list[@]}"; do 29 key=$(echo "$url_and_key" | cut -d' ' -f1) 30 url=$(echo "$url_and_key" | cut -d' ' -f2) 31 32 echo "prefetching ${url}..." 33 hash=$(nix-prefetch-url $url) 34 35 echo "$key = {" >> $hashfile 36 echo " url = \"$url\";" >> $hashfile 37 echo " sha256 = \"$hash\";" >> $hashfile 38 echo "};" >> $hashfile 39 40 echo 41done 42 43echo "}" >> $hashfile 44echo "done."