frigate/docker/Dockerfile.base

39 lines
1.5 KiB
Docker
Raw Normal View History

2020-09-28 15:43:04 +03:00
ARG ARCH=amd64
FROM blakeblackshear/frigate-wheels:${ARCH} as wheels
FROM ubuntu:20.04
2020-01-06 02:43:14 +03:00
LABEL maintainer "blakeb@blakeshome.com"
2020-09-28 15:43:04 +03:00
COPY --from=wheels /wheels/. /wheels/
2020-01-06 02:43:14 +03:00
ENV DEBIAN_FRONTEND=noninteractive
# Install packages for apt repo
2020-09-28 15:43:04 +03:00
RUN apt-get -qq update && apt-get -qq install --no-install-recommends -y \
2020-05-01 14:59:24 +03:00
gnupg wget unzip tzdata \
2020-09-28 15:43:04 +03:00
&& apt-get -qq install --no-install-recommends -y \
2020-01-28 16:24:02 +03:00
python3-pip \
2020-09-28 15:43:04 +03:00
&& pip3 install -U /wheels/*.whl \
2020-01-06 02:43:14 +03: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 - \
2020-09-28 20:29:31 +03:00
&& apt-get -qq update \
2020-01-06 02:43:14 +03:00
&& echo "libedgetpu1-max libedgetpu/accepted-eula boolean true" | debconf-set-selections \
2020-09-28 20:29:31 +03:00
&& apt-get -qq install --no-install-recommends -y \
2020-01-28 16:24:02 +03:00
libedgetpu1-max \
2020-09-28 15:43:04 +03:00
&& rm -rf /var/lib/apt/lists/* /wheels \
2020-01-06 02:43:14 +03:00
&& (apt-get autoremove -y; apt-get autoclean -y)
2020-02-18 14:55:06 +03:00
# get model and labels
2020-07-26 20:03:44 +03:00
RUN wget -q https://github.com/google-coral/edgetpu/raw/master/test_data/ssd_mobilenet_v2_coco_quant_postprocess_edgetpu.tflite -O /edgetpu_model.tflite --trust-server-names
2020-09-07 20:17:42 +03:00
COPY labelmap.txt /labelmap.txt
2020-07-26 20:03:44 +03:00
RUN wget -q https://github.com/google-coral/edgetpu/raw/master/test_data/ssd_mobilenet_v2_coco_quant_postprocess.tflite -O /cpu_model.tflite
2020-07-26 15:50:30 +03:00
RUN mkdir /cache /clips
2020-07-09 14:57:16 +03:00
2019-02-28 15:49:27 +03:00
WORKDIR /opt/frigate/
ADD frigate frigate/
2019-01-26 17:02:59 +03:00
COPY detect_objects.py .
2020-02-22 17:59:16 +03:00
COPY benchmark.py .
2020-09-08 03:37:21 +03:00
COPY process_clip.py .
2019-01-26 17:02:59 +03:00
2020-09-28 15:43:04 +03:00
CMD ["python3", "-u", "detect_objects.py"]