Dockerfile.base 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. ARG ARCH=amd64
  2. FROM blakeblackshear/frigate-wheels:${ARCH} as wheels
  3. FROM ubuntu:20.04
  4. LABEL maintainer "blakeb@blakeshome.com"
  5. COPY --from=wheels /wheels/. /wheels/
  6. ENV DEBIAN_FRONTEND=noninteractive
  7. # Install packages for apt repo
  8. RUN apt-get -qq update && apt-get -qq install --no-install-recommends -y \
  9. gnupg wget unzip tzdata \
  10. && apt-get -qq install --no-install-recommends -y \
  11. python3-pip \
  12. && pip3 install -U /wheels/*.whl \
  13. && APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn apt-key adv --fetch-keys https://packages.cloud.google.com/apt/doc/apt-key.gpg \
  14. && echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" > /etc/apt/sources.list.d/coral-edgetpu.list \
  15. && echo "libedgetpu1-max libedgetpu/accepted-eula select true" | debconf-set-selections \
  16. && apt-get -qq update && apt-get -qq install --no-install-recommends -y \
  17. libedgetpu1-max \
  18. && rm -rf /var/lib/apt/lists/* /wheels \
  19. && (apt-get autoremove -y; apt-get autoclean -y)
  20. # get model and labels
  21. ARG MODEL_REFS=7064b94dd5b996189242320359dbab8b52c94a84
  22. COPY labelmap.txt /labelmap.txt
  23. 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
  24. 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
  25. RUN mkdir /cache /clips
  26. WORKDIR /opt/frigate/
  27. ADD frigate frigate/
  28. COPY detect_objects.py .
  29. COPY benchmark.py .
  30. COPY process_clip.py .
  31. CMD ["python3", "-u", "detect_objects.py"]