Skip to content

Instantly share code, notes, and snippets.

@leigh-johnson
Last active November 22, 2020 01:42
Show Gist options
  • Save leigh-johnson/e51902acf548ab25f3621a7fb57b64a4 to your computer and use it in GitHub Desktop.
Save leigh-johnson/e51902acf548ab25f3621a7fb57b64a4 to your computer and use it in GitHub Desktop.
setup.py with tensorflow 2.x
# 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