tensorflow-on-raspberry-pi
tensorflow-on-raspberry-pi copied to clipboard
Orange Pi+ 2e - AllWinner H3 CPU + Mali 400 GPU support
Original post by @pczekalski:
Dear samjabrahams Thank you for all your effort. Does the Raspberry Pi binaries apply to clone (particularily Orange Pi+ 2e - AllWinner H3 CPU + Mali 400 GPU)? I'm trying to build according to your instruction but I'm stuck with compiling Bazel (java zero fails with Internal Error (os_linux_zero.cpp:254) unhandled signal 11 using OpenJDK Zero VM (25.121-b13) build 1.8.0_121-8u121-b130ubuntu1.16.04.2-b13). The OS is armbian. In case above binaries do not apply, do you know if switching back to Java 1.7 may help?
Kind regards,
P.
@pczekalski - unfortunately, I don't have an Orange Pi to test the build on, so I'm unable to replicate your issue. You might try either switching to Java 1.7 or Oracle Java 1.8 (instead of OpenJDK)
Some quick news on building bazel (needed for Tensorflow build).
I succeeded, but there is a need to modify tmp
to keep more than 1GB (I've provided 4GB actually). To do it, you siply need to run:
sudo nano /etc/fstab
and then change the maximum size in the line corresponding to the temporary file system (change size
to at least 2GB), i.e.:
tmpfs /tmp tmpfs defaults,nosuid,size=4G
Samjabrahams - you may consider introducing this modification into the RPi guide as well as I believe, latest bazel distri requires more than 1GB of tmp space, while compiling. Will test it next week once my RPi3 is finally delivered ;-).
Also had some troubles with final stage when zipping (seemed to be permission problem), solved by forcefully applying chmod 777
recurrent for all source files.
Interresingly I found that switching from OpenJDK to Oracle Java has shortened compilation time at least twice as quick view into the top
presents all four cores are working hard while using Oracle JDK while OpenJDK seems to be singlethreaded (only one core shows activity).
Some news on compiling Tensorflow on Orange Pi+ 2E:
- creating Tensorflow wheel requires two more packages:
sudo pip install wheel
andsudo pip install setuptools
otherwise building pip package with bazel fails.
Hope it helps.
P.
@pczekalski thanks for the info! In the latest version of the guide, I removed the instructions to use OpenJDK 8, instead using the default Oracle JDK. Works like a charm!
As a quick aside: I believe sudo pip install wheel
is already listed in the instructions. setuptools
gets installed somewhere along the line, too, but I'm not exactly sure when (it's possible that it comes preinstalled on Raspbian).