Skip to content

BerryNet on Docker

Bofu Chen edited this page May 26, 2019 · 11 revisions

IMPORTANT: This page is being updated and the content might not be 100% correct.

How to run BerryNet in docker

This page describe how to run BerryNet inside the Docker. The host os is currently on Debian or Ubuntu.

Create a privileged Ubuntu docker instance.

Because BerryNet contains several services which needs systemd to load and run. Thus we start with /sbin/init. Also we need to allow to use USB camera inside.

docker run -d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro -v /dev/bus/usb:/dev/bus/usb --device /dev/video0:/dev/video0 ubuntu:xenial /sbin/init

Login into the docker

docker exec -i -t <instance ID> /bin/bash

Install BerryNet inside the docker

Please note that all the following steps are inside the docker. Not on your host.

  1. We need to install the necessary Debian packages for ./configure first.
apt update
apt install git sudo wget lsb-release
  1. git clone BerryNet.
git clone <berrynet git URL>
  1. configure and install
./configure
  1. Install tensorflow

The installation of tensorflow inside the ./configure will fail because it tries to install the one for ARM. We need to install that by hand.

pip install tensorflow
  1. Change the IP address inside the config file from localhost to 172.x.x.x

  2. Now we can use the browser to access the dashboard outside of the docker through 172.x.x.x IP address.

Clone this wiki locally