Thanks for this guide. However, I am very new to all of this.
First of all, does this need Internet connection to work? Will it send snapshots from my IP Cameras to the “cloud” for processing?
Do you mean, I need to go to my Synology Docker GUI and download the latest tensorflow image from the registry and then launch it as per Docker | TensorFlow ? The instruction at Docker | TensorFlow is quite confusing to me too. Since I only use Docker via the GUI, I have no idea how to get started.
Which example should I follow? CPU-only images or GPU-enabled images? Which one is recommended? My Synology NAS is self-built using GIGABYTE GA-H97N-WIFI Motherboard. It has Integrated graphic processor.
I haven’t used it in a NAS before, but does the Synology Docker GUI allow you to enter the container? From the command line it’d be something like docker exec -it container_name bash. Personally I use Portainer to manage mine. Once you’re in the container you can run those steps.
Close but no cigar :). You’d run the TensorFlow setup in the Home Assistant container. It doesn’t need a separate one. Does that UI give you the ability to run bash within the Home Assistant container?
Most of what I need is in there, although I’d have to reinstall the python component.
EDIT: I took a look at the container and it has the following files:
root@docker:/usr/src/app# pip3 uninstall tensorflow
Uninstalling tensorflow-1.11.0:
Would remove:
/usr/local/bin/freeze_graph
/usr/local/bin/saved_model_cli
/usr/local/bin/tensorboard
/usr/local/bin/tflite_convert
/usr/local/bin/toco
/usr/local/bin/toco_from_protos
/usr/local/lib/python3.6/site-packages/tensorflow-1.11.0.dist-info/*
/usr/local/lib/python3.6/site-packages/tensorflow/*
Proceed (y/n)? n
I’m guessing I could change export PYTHONUSERBASE=/config/deps to get the python components to install in the persistent volume. However, that wouldn’t include the other components unless they’re in the image by default. I’d love to run it in a standalone container, but getting the HA to query the TensorFlow API is likely beyond my abilities.
I created a simple script to update hass. I also use watchtower but didnt want to automate it because of breaking changes. I manually upgrade after a release.
When I run docker exec -it homeassistant /bin/bash pip3 install tensorflow==1.11.0
I get the following errors:
/usr/local/bin/pip3: line 4: import: command not found
/usr/local/bin/pip3: line 5: import: command not found
/usr/local/bin/pip3: line 7: from: command not found
/usr/local/bin/pip3: pip3: line 10: syntax error near unexpected token (' /usr/local/bin/pip3: pip3: line 10: sys.argv[0] = re.sub(r’(-script.pyw?|.exe)?$’, ‘’, sys.argv[0])’