2020-09-28 14:43:04 +02:00
|
|
|
ARG ARCH=amd64
|
|
|
|
FROM blakeblackshear/frigate-wheels:${ARCH} as wheels
|
2020-10-07 23:25:54 +02:00
|
|
|
FROM blakeblackshear/frigate-ffmpeg:${ARCH} as ffmpeg
|
2020-09-28 14:43:04 +02:00
|
|
|
|
2020-09-22 04:02:00 +02:00
|
|
|
FROM ubuntu:20.04
|
2020-01-06 00:43:14 +01:00
|
|
|
LABEL maintainer "blakeb@blakeshome.com"
|
2019-06-02 14:29:50 +02:00
|
|
|
|
2020-10-07 23:25:54 +02:00
|
|
|
COPY --from=ffmpeg /usr/local /usr/local/
|
|
|
|
|
2020-09-28 14:43:04 +02:00
|
|
|
COPY --from=wheels /wheels/. /wheels/
|
|
|
|
|
2020-10-24 18:40:44 +02:00
|
|
|
ENV FLASK_ENV=development
|
2020-01-06 00:43:14 +01:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
2019-05-27 17:17:57 +02:00
|
|
|
# Install packages for apt repo
|
2020-10-25 18:15:50 +01:00
|
|
|
RUN apt-get -qq update \
|
|
|
|
&& apt-get upgrade -y \
|
|
|
|
&& 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-09-30 00:09:58 +02:00
|
|
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn apt-key adv --fetch-keys https://packages.cloud.google.com/apt/doc/apt-key.gpg \
|
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 \
|
2020-09-30 00:09:58 +02:00
|
|
|
&& echo "libedgetpu1-max libedgetpu/accepted-eula select true" | debconf-set-selections \
|
|
|
|
&& apt-get -qq update && apt-get -qq install --no-install-recommends -y \
|
2020-11-07 19:08:24 +01:00
|
|
|
libedgetpu1-max=15.0 \
|
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-09-30 00:09:58 +02:00
|
|
|
ARG MODEL_REFS=7064b94dd5b996189242320359dbab8b52c94a84
|
2020-09-07 19:17:42 +02:00
|
|
|
COPY labelmap.txt /labelmap.txt
|
2020-09-30 00:09:58 +02:00
|
|
|
RUN wget -q https://github.com/google-coral/edgetpu/raw/$MODEL_REFS/test_data/ssd_mobilenet_v2_coco_quant_postprocess_edgetpu.tflite -O /edgetpu_model.tflite
|
|
|
|
RUN wget -q https://github.com/google-coral/edgetpu/raw/$MODEL_REFS/test_data/ssd_mobilenet_v2_coco_quant_postprocess.tflite -O /cpu_model.tflite
|
2020-07-02 15:43:33 +02:00
|
|
|
|
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
|
|
|
|
2020-10-31 13:04:32 +01:00
|
|
|
CMD ["python3", "-u", "-m", "frigate"]
|