2020-01-16 17:14:58 -06:00
|
|
|
FROM ubuntu:18.04
|
2020-01-05 17:43:14 -06:00
|
|
|
LABEL maintainer "blakeb@blakeshome.com"
|
2019-06-02 07:29:50 -05:00
|
|
|
|
2020-01-05 17:43:14 -06:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
2019-05-27 10:17:57 -05:00
|
|
|
# Install packages for apt repo
|
2020-01-05 17:43:14 -06:00
|
|
|
RUN apt -qq update && apt -qq install --no-install-recommends -y \
|
2020-01-28 07:24:02 -06:00
|
|
|
software-properties-common \
|
|
|
|
# apt-transport-https ca-certificates \
|
|
|
|
build-essential \
|
2020-01-05 17:43:14 -06:00
|
|
|
gnupg wget \
|
2020-01-28 07:24:02 -06:00
|
|
|
# libcap-dev \
|
|
|
|
&& add-apt-repository ppa:deadsnakes/ppa -y \
|
|
|
|
&& apt -qq install --no-install-recommends -y \
|
|
|
|
python3.7 \
|
|
|
|
python3.7-dev \
|
|
|
|
python3-pip \
|
|
|
|
ffmpeg \
|
|
|
|
# VAAPI drivers for Intel hardware accel
|
|
|
|
libva-drm2 libva2 i965-va-driver vainfo \
|
|
|
|
&& python3.7 -m pip install -U wheel setuptools \
|
|
|
|
&& python3.7 -m pip install -U \
|
|
|
|
opencv-python-headless \
|
|
|
|
# python-prctl \
|
|
|
|
numpy \
|
|
|
|
imutils \
|
2020-01-31 10:50:42 -06:00
|
|
|
scipy \
|
|
|
|
&& python3.7 -m pip install -U \
|
2020-01-30 20:12:29 -06:00
|
|
|
SharedArray \
|
2020-02-15 21:07:54 -06:00
|
|
|
Flask \
|
|
|
|
paho-mqtt \
|
|
|
|
PyYAML \
|
|
|
|
matplotlib \
|
|
|
|
pyarrow \
|
2020-01-05 17:43:14 -06:00
|
|
|
&& echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" > /etc/apt/sources.list.d/coral-edgetpu.list \
|
|
|
|
&& wget -q -O - https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - \
|
|
|
|
&& apt -qq update \
|
|
|
|
&& echo "libedgetpu1-max libedgetpu/accepted-eula boolean true" | debconf-set-selections \
|
|
|
|
&& apt -qq install --no-install-recommends -y \
|
2020-01-28 07:24:02 -06:00
|
|
|
libedgetpu1-max \
|
|
|
|
## Tensorflow lite (python 3.7 only)
|
2020-02-09 07:39:49 -06:00
|
|
|
&& wget -q https://dl.google.com/coral/python/tflite_runtime-2.1.0-cp37-cp37m-linux_x86_64.whl \
|
|
|
|
&& python3.7 -m pip install tflite_runtime-2.1.0-cp37-cp37m-linux_x86_64.whl \
|
|
|
|
&& rm tflite_runtime-2.1.0-cp37-cp37m-linux_x86_64.whl \
|
2020-01-05 17:43:14 -06:00
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
&& (apt-get autoremove -y; apt-get autoclean -y)
|
|
|
|
|
2020-01-28 07:24:02 -06:00
|
|
|
# # symlink the model and labels
|
|
|
|
# RUN wget -q https://github.com/google-coral/edgetpu/raw/master/test_data/mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite -O mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite --trust-server-names
|
|
|
|
# RUN wget -q https://dl.google.com/coral/canned_models/coco_labels.txt -O coco_labels.txt --trust-server-names
|
|
|
|
# RUN ln -s mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite /frozen_inference_graph.pb
|
|
|
|
# RUN ln -s /coco_labels.txt /label_map.pbtext
|
2019-03-30 07:58:31 -05:00
|
|
|
|
2019-02-28 06:49:27 -06:00
|
|
|
WORKDIR /opt/frigate/
|
|
|
|
ADD frigate frigate/
|
2019-01-26 08:02:59 -06:00
|
|
|
COPY detect_objects.py .
|
2019-06-04 21:38:41 -05:00
|
|
|
COPY benchmark.py .
|
2019-01-26 08:02:59 -06:00
|
|
|
|
2020-01-30 20:12:29 -06:00
|
|
|
CMD ["python3", "-u", "benchmark.py"]
|