简体   繁体   中英

Docker Error When Compiling Tensorflow from source on Raspberry Pi

I am attempting to build tensorflow from source on Raspberry PI using docker following this tutorial: https://www.tensorflow.org/install/source_rpi

I have python 3.4 and 3.7 installed, and Docker version 18.06.3-ce. I get stuck on this step:

CI_DOCKER_EXTRA_PARAMS="-e CI_BUILD_PYTHON=python3 -e CROSSTOOL_PYTHON_INCLUDE_PATH=/usr/include/python3.4" \
tensorflow/tools/ci_build/ci_build.sh PI-PYTHON3 \
tensorflow/tools/ci_build/pi/build_raspberry_pi.sh

which at step 4 of the docker process fails:

...
Step 4/14 : RUN /install/install_bootstrap_deb_packages.sh
     ---> Running in d898ac94cbfe
    The command '/bin/sh -c /install/install_bootstrap_deb_packages.sh' returned a non-zero code: 139
    ERROR: docker build failed. Dockerfile is at /home/pi/tensorflow/tensorflow/tools/ci_build/Dockerfile.pi-python3

I am running raspian 8 (jessie) on a raspberry pi zero W. I have tried building multiple tensorflow versions, including the most stable release, and all have the same results. Any help would be greatly appreciated

Issue

The guide you are following references cross-compiling , which means they are building on a host machine, while you are trying to build on the Pi.

To build Tensorflow go on raspberry pi you have to have libtensorflow.so , which is clibrary for Tensorflow used by GoLang.

Check out this post for more info on the issue you are having.

Solution

If you wish to build Tensorflow on the Pi, follow this guide to walk you through building the required library, libtensorflow.so.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM