diff --git a/.env/example-inventory.ini b/.env/example-inventory.ini index 51d113f0..bb52b430 100644 --- a/.env/example-inventory.ini +++ b/.env/example-inventory.ini @@ -1,5 +1,5 @@ [rpi_vision] -theia.local +raspberrypi.local [rpi_vision:vars] ansible_connection=ssh ansible_user=pi diff --git a/.env/example-vars.json b/.env/example-vars.json index 0ae58194..d3bd30a8 100644 --- a/.env/example-vars.json +++ b/.env/example-vars.json @@ -1,3 +1,3 @@ { - "VERSION": "master" + "VERSION": "tf-2" } \ No newline at end of file diff --git a/includes/tensorflow-2.0.0-cp37-cp37m-linux_armv7l.whl b/includes/tensorflow-2.0.0-cp37-cp37m-linux_armv7l.whl new file mode 100644 index 00000000..a3393738 Binary files /dev/null and b/includes/tensorflow-2.0.0-cp37-cp37m-linux_armv7l.whl differ diff --git a/playbooks/bootstrap-rpi.yml b/playbooks/bootstrap-rpi.yml index 003e0b37..100ac8a5 100644 --- a/playbooks/bootstrap-rpi.yml +++ b/playbooks/bootstrap-rpi.yml @@ -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' @@ -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}}" diff --git a/setup.py b/setup.py index 72f87170..ee51a309 100644 --- a/setup.py +++ b/setup.py @@ -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 @@ -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', ] @@ -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') + ] )