mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
39 lines
1.5 KiB
Docker
39 lines
1.5 KiB
Docker
ARG ARCH=amd64
|
|
FROM blakeblackshear/frigate-wheels:${ARCH} as wheels
|
|
|
|
FROM ubuntu:20.04
|
|
LABEL maintainer "blakeb@blakeshome.com"
|
|
|
|
COPY --from=wheels /wheels/. /wheels/
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
# Install packages for apt repo
|
|
RUN apt-get -qq update && apt-get -qq install --no-install-recommends -y \
|
|
gnupg wget unzip tzdata \
|
|
&& apt-get -qq install --no-install-recommends -y \
|
|
python3-pip \
|
|
&& pip3 install -U /wheels/*.whl \
|
|
&& 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 \
|
|
libedgetpu1-max \
|
|
&& rm -rf /var/lib/apt/lists/* /wheels \
|
|
&& (apt-get autoremove -y; apt-get autoclean -y)
|
|
|
|
# get model and labels
|
|
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
|
|
COPY labelmap.txt /labelmap.txt
|
|
RUN wget -q https://github.com/google-coral/edgetpu/raw/master/test_data/ssd_mobilenet_v2_coco_quant_postprocess.tflite -O /cpu_model.tflite
|
|
|
|
RUN mkdir /cache /clips
|
|
|
|
WORKDIR /opt/frigate/
|
|
ADD frigate frigate/
|
|
COPY detect_objects.py .
|
|
COPY benchmark.py .
|
|
COPY process_clip.py .
|
|
|
|
CMD ["python3", "-u", "detect_objects.py"]
|