Skip to main content

Tesorflow Docker for Raspberry Pi

Supercharged Machine Learning ToolBox for ARM

A Docker image for ARM devices with Tensorflow 1.7.0 rc1 an open source software library for numerical computation using data flow graphs that will let you play and learn distinct Machine Learning techniques over JupyterLab an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and explanatory text. Computational Narratives as the Engine of Collaborative Data Science. All this under Python 2.7 language.
There is very similar image based on Python 3.4 instead of 2.7 elswork/rpi-tensorflow-py3.
Be aware! You should read carefully the usage documentation of every tool!

Latest Changes

1.7.0 rc1

  • Upgraded from Tensorflow 1.6.0 to 1.7.0rc1

1.6.0

  • Upgraded from Tensorflow 1.6.0 rc1 to 1.6.0

1.6.0 rc1

  • Upgraded from Tensorflow 1.5.0 to 1.6.0rc1
  • Replace with new latest binary
  • Replaced base image with ubuntu:16.04 the same as official tensorflow container
  • Change jupyter notebook for jupyterlab

1.5.0

  • Upgraded from Tensorflow 1.5.0 rc1 to 1.5.0
  • Replace with new latest binary

1.5.0 rc1

  • Upgraded from Tensorflow 1.4.0 to 1.5.0rc1
  • Replace with new latest binary

1.4.0

1.3.0

  • Upgraded from Tensorflow 1.2.1 to 1.3.0

1.2.1

Details

Thanks to

Build Instructions

Build for arm32v7 architecture
docker build -t elswork/rpi-tensorflow:latest .
Build for amd64 architecture
docker build -t elswork/rpi-tensorflow:latest \
 --build-arg WHL_URL=https://storage.googleapis.com/tensorflow/linux/cpu/ \
 --build-arg WHL_FILE=tensorflow-1.7.0rc1-cp27-none-linux_x86_64.whl .

My Real Usage Example

In order everyone could take full advantages of the usage of this docker container, I'll describe my own real usage setup.
For amd64 architecture replace latest by amd64 tag.
docker run -d -p 8888:8888 elswork/rpi-tensorflow:latest
A more complex sample:
docker run -d -p 8888:8888 -p 0.0.0.0:6006:6006 \
 --restart=unless-stopped elswork/rpi-tensorflow:latest
Point your browser to http://localhost:8888
First time you open it, you should provide a Token to log on you cand find it with this command:
docker logs container_name
With the second example you can run TensorBoard executing this command in the container:
tensorboard --logdir=path/to/log-directory --host=0.0.0.0
And pointing your browser to http://localhost:6006
https://hub.docker.com/r/elswork/rpi-tensorflow/

Comments

Popular posts from this blog

Raspberry pi Ser2Net Install

sudo apt-get install ser2net sudo nano /etc/ser2net.conf % change last lines to 2000:raw:600:/dev/ttyAMA0:57600 8DATABITS NONE  1STOPBIT banner sudo /etc/init.d/ser2net restart sudo nano /etc/inittab % add hash to this line #T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100 sudo nano /boot/cmdline.txt % delete references to ttyAMA0 % "console=ttyAMA0,115200 kgdboc=ttyAMA0,115200" sudo shutdown -r now

Modem Connection with raspberry py

Aim : Set up the  Raspberry Pi  as a wireless router using the Raspbian OS. The internet connection will be provided by a  Huawei E303  USB 3g dongle on the safaricom network in Kenya, though the setup should be similar on most Huawei dongles and 3g networks. The wireless access point will be provided by an  Edimax Nano USB Wifi adapter . Power Source -------->RPI ----> Powered USB HUB -----> 3g Dongle                                            |                                            |                                          Edimax                       ...

OpenCV Docker Image and use

Open CV Install docker mage run $ docker ps $ docker start 0c5f0bc9b04c $ docker ps -a We need to go Self terminal not SSH terminal $ gksudo open a bog and type lxterminal Python and OpenCV. Alright, now we can finally start writing some code! Open up a new file, name it   test_image . py  , and insert the following code: Accessing the Raspberry Pi Camera with OpenCV and Python Python 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 # import the necessary packages from picamera . array import PiRGBArray from picamera import PiCamera import time import cv2   # initialize the camera and grab a reference to the raw camera capture camera = PiCamera ( ) rawCapture = PiRGBArray ( camera )   # allow the camera to warmup time . sleep ( 0.1 )   # grab an image from the camera camera . capture ( rawCapture , format = "bgr" ) image = rawC...