Skip to content

Files

Latest commit

May 22, 2020
6117e84 · May 22, 2020

History

History

rpi-deeplearning

One-Off Coder Logo

Purpose

The purpose of this container is to create a Python 3.4 Deep Learning environment with Jupyter Lab for use with Raspberry Pi 4 (armv7l).

Note that you should be building and using this container only on a Raspberry Pi 4.

Docker Hub

Image

Tensorflow

Before you may build this docker image, you will need to cross compile Tensorflow for the Raspberry Pi. Note when you compile Tensorflow, you have to compile on a x86 computer (not on a Raspberry Pi or any ARMv7 CPU).

git clone https://github.com/tensorflow/tensorflow.git

cd tensorflow

git checkout r1.14

tensorflow/tools/ci_build/ci_build.sh PI \
    tensorflow/tools/ci_build/pi/build_raspberry_pi.sh PI_ONE

After you are done, place the $TENSORFLOW/output-artifacts into this directory, where $TENSORFLOW is the path to where you checked out the Tensorflow git repository. Additionally, rename tensorflow-1.14.1-cp34-none-linux_armv7l.whl to tensorflow-1.14.1-cp36-none-linux_armv7l.whl.

Docker

Build it.

./build.sh

Run it (plain).

docker run -it -p 8888:8888 rpi-deeplearning:local

Run it (with host mount).

docker run -it \
    -p 8888:8888 \
    -v $HOME/git/docker-containers/rpi-deeplearning/ipynb:/ipynb \
    rpi-deeplearning:local

Run it (with Jupyter Notebook instead of Jupyter lab)

docker run -it \
    -p 8888:8888 \
    -v $HOME/git/docker-containers/rpi-deeplearning/ipynb:/ipynb \
    -e JUPYTER_TYPE=notebook \
    rpi-deeplearning:local

Observe it.

Links

Take a Look!

Check out John Backus.

Citation

@misc{oneoffcoder_rpi_deeplearning_2019, 
title={Docker container with Tensorflow for Raspberry Pi 4}, 
url={https://github.com/oneoffcoder/docker-containers/tree/master/rpi-deeplearning}, 
journal={GitHub},
author={One-Off Coder}, 
year={2019}, 
month={Jul}}