Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use official TensorFlow 2.0 wheel #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env/example-inventory.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[rpi_vision]
theia.local
raspberrypi.local
[rpi_vision:vars]
ansible_connection=ssh
ansible_user=pi
Expand Down
2 changes: 1 addition & 1 deletion .env/example-vars.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"VERSION": "master"
"VERSION": "tf-2"
}
Binary file not shown.
4 changes: 2 additions & 2 deletions playbooks/bootstrap-rpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
- name: "Install platform dependencies"
become: yes
apt:
name: ['tmux']
name: ['tmux', 'cmake', 'virtualenv']
- name: "Clone rpi-vision"
git:
repo: 'https://github.com/leigh-johnson/rpi-vision'
Expand Down Expand Up @@ -103,7 +103,7 @@
content: "/usr/local/bin/{{tft_driver_install_script}}"
dest: /home/pi/.tft_screen_installed
- name: Create virtual environment
shell: virtualenv -p $(which python3.6) .venv
shell: virtualenv -p $(which python3) .venv
args:
creates: "{{rpi_vision_dir}}/.venv"
chdir: "{{rpi_vision_dir}}"
Expand Down
23 changes: 11 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

'''The setup script.'''

import subprocess
import os
import platform
import subprocess
from setuptools import setup, find_packages, Command
from distutils.command.build import build as _build

Expand All @@ -16,29 +17,23 @@
history = history_file.read()

common_requirements = []

# tensorflow 2.0 wheel has not been released for Raspbian yet
trainer_requirements = [
'ansible==2.8.1',
'tensorflow==2.0.0-beta0',
'tensorflow-datasets==1.0.2',
'tensorflow-hub==0.5.0'
'tensorflow-datasets>=1.3.0',
'tensorflow-hub>=0.7.0',
'tensorflow==2.0.0'
]
trainer_requirements = list(map(
lambda x: x + ';platform_machine=="x86_64"', trainer_requirements
))

rpi_requirements = [
'picamera==1.13.0',
'Pillow==6.0.0'
'picamera>=1.13.0',
'Pillow>=6.0.0',
]
rpi_requirements = list(map(
lambda x: x + ';platform_machine=="armv7l"', rpi_requirements))

if 'arm' in platform.machine():
rpi_requirements.append(
'tensorflow@https://github.com/PINTO0309/Tensorflow-bin/raw/master/tensorflow-2.0.0b1-cp35-cp35m-linux_armv7l.whl')

requirements = common_requirements + trainer_requirements + rpi_requirements

setup_requirements = ['pytest-runner', ]
Expand Down Expand Up @@ -138,4 +133,8 @@ def run(self):
url='https://github.com/leigh-johnson/rpi-vision',
version='0.1.0',
zip_safe=False,
dependency_links=[
# location to your egg file
os.path.join(os.getcwd(), 'includes', 'tensorflow-2.0.0-cp37-cp37m-linux_armv7l.whl')
]
)