Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,20 @@ the Raspberry Pi.

## Build instructions

1. Install Docker on your Raspberry Pi.
1. `curl -sSL get.docker.com | sh`
1. `sudo usermod -aG docker pi`
1. log out, then log back in again for the change to take effect
1. `sudo systemctl start docker`
1. Install Docker on your 64-bit x86 cross-build host.
* `curl -sSL get.docker.com | sh`
* `sudo usermod -aG docker pi`
* log out, then log back in again for the change to take effect
* `sudo systemctl start docker`
1. Run qemu multiarch support service.
* `docker run --rm --privileged multiarch/qemu-user-static:register`
1. Clone this repository into a directory of your choice
1. `git clone https://github.com/romilly/rpi-docker-tensorflow.git`
* `git clone https://github.com/liuqun/rpi-docker-tensorflow.git`
* `cd rpi-docker-tensorflow`
* `git checkout crossbuild`
1. Build the image
1. `cd rpi-docker-tensorflow/build-tensor-pi/`
1. `docker build -t='yourName/rpi-docker-tensorflow' .`
* `cd build-tensor-pi`
* `docker build -t='yourName/rpi-docker-tensorflow' .`

## Running the image

Expand Down
26 changes: 12 additions & 14 deletions build-tensor-pi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
FROM resin/rpi-raspbian
FROM multiarch/debian-debootstrap:armhf-stretch

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
libatlas3-base \
libfreetype6-dev \
libpng12-dev \
libpng-dev \
libzmq3-dev \
pkg-config \
python \
python-dev \
python-numpy \
python-scipy \
rsync \
unzip

RUN apt-get clean && \
unzip \
&& apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN curl -O https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py && \
rm get-pip.py
WORKDIR /tmp
COPY get-pip.py /tmp/
RUN python /tmp/get-pip.py && \
rm /tmp/get-pip.py

COPY pip.conf /etc/pip.conf
RUN pip --no-cache-dir install "numpy==1.14.5"
RUN pip --no-cache-dir install \
ipykernel \
jupyter \
matplotlib && \
python -m ipykernel.kernelspec

ADD tensorflow-0.10.0-cp27-none-linux_armv7l.whl .

RUN pip install tensorflow-0.10.0-cp27-none-linux_armv7l.whl
RUN pip --no-cache-dir install "tensorflow==1.9.0"

COPY jupyter_notebook_config.py /root/.jupyter/

Expand Down
Loading