Skip to content
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

100 lines (79 sloc) 3.71 KB
FROM balenalib/raspberrypi3-debian:stretch
RUN [ "cross-build-start" ]
LABEL mantainer="Muro Riva <>" \$BUILD_DATE \"raspbian-edgetpu" \
org.label-schema.description="Docker running Raspbian including Coral Edge-TPU libraries" \
org.label-schema.url="" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="" \
org.label-schema.vendor="Mauro Riva" \
org.label-schema.version=$VERSION \
ENV CONFIG_PATH="/root/.jupyter/"
#do installation
RUN apt-get update \
&& apt-get install -y --no-install-recommends openssh-server \
#do users
&& echo 'root:root' | chpasswd \
&& sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config \
&& sed 's@session\s*required\s* optional' -i /etc/pam.d/sshd \
&& mkdir /var/run/sshd
#install libraries for camera
RUN apt-get install -y --no-install-recommends build-essential wget feh pkg-config libjpeg-dev zlib1g-dev \
libraspberrypi0 libraspberrypi-dev libraspberrypi-doc libraspberrypi-bin libfreetype6-dev libxml2 libopenjp2-7 \
libatlas-base-dev libjasper-dev libqtgui4 libqt4-test \
python3-dev python3-pip python3-setuptools python3-wheel python3-numpy python3-pil python3-matplotlib python3-zmq
#nodejs for notebooks
RUN curl -sL | sudo -E bash - \
&& apt-get install -y nodejs
#python libraries
RUN python3 -m pip install supervisor \
&& python3 -m pip install picamera python-periphery \
&& python3 -m pip install jupyter cython jupyterlab ipywebrtc opencv-python \
&& python3 -m pip install google-auth oauthlib imutils
#jupyter packages
RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager \
&& jupyter labextension install jupyter-webrtc \
&& jupyter nbextension enable --py widgetsnbextension
#install live camera libraries
RUN apt-get install libgstreamer1.0-0 gstreamer1.0-tools \
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly v4l-utils
#installing edge-tpu library
#downloading library file
RUN wget -O edgetpu_api.tar.gz --trust-server-names \
&& tar xzf edgetpu_api.tar.gz \
&& rm edgetpu_api.tar.gz
#SSL for jupyter
RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout mykey.key -out mycert.pem -subj '/O=LeMaRiva|tech/C=DE'
#trick platform recognizer
COPY "./conf/" /opt/edgetpu_api/
#installing library
RUN cd /opt/edgetpu_api/ \
&& chmod +x \
&& bash -y
#copy files
RUN mkdir /notebooks
COPY "./examples/*" /notebooks/
COPY "./conf/" ${CONFIG_PATH}
#loading pretrained models
WORKDIR /notebooks
RUN wget -P test_data/ \
&& wget -P test_data/ \
&& tar xvf examples_edgetpu.tar.xz \
&& rm examples_edgetpu.tar.xz
#copy supervisord files
COPY "./conf/supervisord.conf" /etc/supervisor/conf.d/supervisord.conf
RUN mkdir /var/log/supervisord/
CMD ["/usr/local/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
#SSH Port
EXPOSE 22 8888 8080
#set stop signal
#stop processing ARM emulation (comment out next line if built on Raspberry)
RUN [ "cross-build-end" ]
You can’t perform that action at this time.