2019-07-13 20:37:01 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2019-06-22 12:43:06 +01:00
|
|
|
version=1.14.0
|
2019-07-13 20:37:01 +01:00
|
|
|
hashfile=binary-hashes.nix
|
2018-05-30 15:38:51 +01:00
|
|
|
rm -f $hashfile
|
|
|
|
echo "{" >> $hashfile
|
2019-07-13 20:37:01 +01:00
|
|
|
echo "version = \"$version\";" >> $hashfile
|
2018-05-30 15:38:51 +01:00
|
|
|
for sys in "linux" "mac"; do
|
|
|
|
for tfpref in "cpu/tensorflow" "gpu/tensorflow_gpu"; do
|
2019-03-01 12:28:19 +00:00
|
|
|
for pykind in "py2-none-any" "py3-none-any" "cp27-none-linux_x86_64" "cp35-cp35m-linux_x86_64" "cp36-cp36m-linux_x86_64" "cp37-cp37m-linux_x86_64"; do
|
2018-05-30 15:38:51 +01:00
|
|
|
if [ $sys == "mac" ]; then
|
|
|
|
[[ $pykind =~ py.* ]] && [[ $tfpref =~ cpu.* ]]
|
|
|
|
result=$?
|
|
|
|
pyver=${pykind:2:1}
|
|
|
|
flavour=cpu
|
|
|
|
else
|
|
|
|
[[ $pykind =~ .*linux.* ]]
|
|
|
|
result=$?
|
|
|
|
pyver=${pykind:2:2}
|
|
|
|
flavour=${tfpref:0:3}
|
|
|
|
fi
|
|
|
|
if [ $result == 0 ]; then
|
|
|
|
url=https://storage.googleapis.com/tensorflow/$sys/$tfpref-$version-$pykind.whl
|
|
|
|
hash=$(nix-prefetch-url $url)
|
|
|
|
echo "${sys}_py_${pyver}_${flavour} = {" >> $hashfile
|
|
|
|
echo " url = \"$url\";" >> $hashfile
|
|
|
|
echo " sha256 = \"$hash\";" >> $hashfile
|
|
|
|
echo "};" >> $hashfile
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
|
|
|
done
|
2018-08-07 09:36:04 +01:00
|
|
|
echo "}" >> $hashfile
|