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

TensorFlow not working in HA Docker 0.84.6 #19685

Closed
det-peralta opened this issue Dec 31, 2018 · 6 comments

Comments

Projects
None yet
5 participants
@det-peralta
Copy link

commented Dec 31, 2018

Home Assistant release with the issue: 0.84.6

Last working Home Assistant release (if known): never

Operating environment (Hass.io/Docker/Windows/etc.):
Docker

Component/platform:
https://www.home-assistant.io/components/image_processing.tensorflow/

Description of problem:
Tensorflow is not starting, hangs HA

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

---
platform: tensorflow
scan_interval: 20000
source:
  - entity_id: camera.front_hikvision
model:
  graph: /config/tensorflow/frozen_inference_graph.pb

Traceback (if applicable):

2018-12-31 16:49:38 INFO (MainThread) [homeassistant.setup] Setting up image_processing
2018-12-31 16:49:38 INFO (MainThread) [homeassistant.components.image_processing] Setting up image_processing.tensorflow
2018-12-31 16:49:38.667433: F tensorflow/core/platform/cpu_feature_guard.cc:37] The TensorFlow library was compiled to use AVX instructions, but these aren't available on your machine.

Additional information:
Ive followed this script
https://gist.github.com/det-peralta/5753f37f2bb46dce71b9fcc3cbef8f05

@hunterjm

This comment has been minimized.

Copy link
Contributor

commented Dec 31, 2018

What CPU are you running? Is your docker image being run directly on the host, or in a virtual machine? See #18435 for a similar issue that was resolved when a user was running Docker inside a VM, but did not have the VM configured to use the Host CPU.

@det-peralta

This comment has been minimized.

Copy link
Author

commented Dec 31, 2018

https://www.synology.com/en-global/products/DS918+#specs

CPU: Intel Celeron J3455

There is specify command/settings to use CPU host?

docker run -d --restart=always -v /pathconfig/:/config -e TZ=Europe/London --name ha -p 8123:8123 homeassistant/home-assistant

@hunterjm

This comment has been minimized.

Copy link
Contributor

commented Dec 31, 2018

The Celeron CPU you are using uses the Goldmont microarchitecture, which does not have support for the AVX extension. See here for TensorFlow hardware requirements.

If you want to run TensorFlow in Home Assistant on your Synology, you can extend the Home Assistant docker image and build TensorFlow from source.

@grzeg8102

This comment has been minimized.

Copy link

commented Feb 28, 2019

I also though on the beginning that there's a problem with HA/Tensorflow in Docker, but then realized what hunterjm said - my Celeron does not support AVX.

@hunterjm - are you suggesting above that it is possible to build Tensorflow on Synology and still be able to use it even though these CPUs do not support AVX? Could you elaborate a bit more?
I'm asking as I'm interested exactly in this - to run Tensorflow on my Synology and use it with HA.
Thanks!

@hunterjm

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2019

The pre-built TensorFlow pip packages are compiled to require AVX on the CPU. We need to update the docs to reflect this, as we can not add support for all CPUs with a single docker image.

@stale

This comment has been minimized.

Copy link

commented Jul 7, 2019

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 7, 2019

@stale stale bot closed this Jul 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.