blakeblackshear.frigate/docker/Dockerfile.base

39 lines
1.5 KiB
Docker
Raw Normal View History

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