Skip to content

Instantly share code, notes, and snippets.

@petewarden
Last active April 4, 2018 04:34
Show Gist options
  • Save petewarden/6aa9650fe72d88889d24efd76598f8cb to your computer and use it in GitHub Desktop.
Save petewarden/6aa9650fe72d88889d24efd76598f8cb to your computer and use it in GitHub Desktop.
git clone https://github.com/tensorflow/tensorflow tensorflow
cd tensorflow
docker build -t "tf-pi" -f tensorflow/tools/ci_build/Dockerfile.cpu tensorflow/tools/ci_build/
docker run -it tf-pi
# Commands after this are run on the Docker instance.
dpkg --add-architecture armhf
echo 'deb [arch=armhf] http://ports.ubuntu.com/ trusty main restricted universe multiverse' >> /etc/apt/sources.list.d/armhf.list
echo 'deb [arch=armhf] http://ports.ubuntu.com/ trusty-updates main restricted universe multiverse' >> /etc/apt/sources.list.d/armhf.list
echo 'deb [arch=armhf] http://ports.ubuntu.com/ trusty-security main restricted universe multiverse' >> /etc/apt/sources.list.d/armhf.list
echo 'deb [arch=armhf] http://ports.ubuntu.com/ trusty-backports main restricted universe multiverse' >> /etc/apt/sources.list.d/armhf.list
sed -i 's#deb http://archive.ubuntu.com/ubuntu/#deb [arch=amd64] http://archive.ubuntu.com/ubuntu/#g' /etc/apt/sources.list
apt-get update
apt-get install -y libpython-all-dev:armhf
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
apt-get update
rm -rf /usr/local/bin/bazel
apt-get install -y bazel python python-numpy python-dev python-pip
git clone https://github.com/tensorflow/tensorflow tensorflow
cd tensorflow
third_party/toolchains/cpus/arm/build_raspberry_pi.sh
# On the host OS (change the path to the actual temp directory shown by the build output).
docker cp `docker ps -alq`:/tmp/tmp.smXLh20Qhj/tensorflow-1.3.0rc0-cp27-none-any.whl ~/Downloads/
@mattfeury
Copy link

mattfeury commented Aug 19, 2017

was able to comment that __doc__ line out and everything is running fine now. so slowww tho, but that's another matter entirely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment