Last active
November 22, 2020 01:42
-
-
Save leigh-johnson/e51902acf548ab25f3621a7fb57b64a4 to your computer and use it in GitHub Desktop.
setup.py with tensorflow 2.x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# setup.py | |
import os | |
from setuptools import setup | |
arch = os.uname().machine | |
if arch == 'armv7l': | |
tensorflow = 'tensorflow @ https://github.com/bitsy-ai/tensorflow-arm-bin/releases/download/v2.4.0-rc2/tensorflow-2.4.0rc2-cp37-none-linux_armv7l.whl' | |
elif arch == 'aarch64': | |
tensorflow = 'https://github.com/bitsy-ai/tensorflow-arm-bin/releases/download/v2.4.0-rc2/tensorflow-2.4.0rc2-cp37-none-linux_aarch64.whl' | |
elif arch == 'x86_64': | |
tensorflow = "tensorflow==2.4.0rc2" | |
else: | |
raise Exception(f'Could not find TensorFlow binary for target {arch}. Please open a Github issue.') | |
requirements = [ | |
tensorflow, | |
# specify additional package requirements here | |
] | |
setup( | |
install_requires=requirements, | |
# specify additional setup parameters here | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment