Dockerfile.base 1.5 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. && echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" > /etc/apt/sources.list.d/coral-edgetpu.list \
  14. && wget -q -O - https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - \
  15. && apt -qq update \
  16. && echo "libedgetpu1-max libedgetpu/accepted-eula boolean true" | debconf-set-selections \
  17. && apt -qq install --no-install-recommends -y \
  18. libedgetpu1-max \
  19. && rm -rf /var/lib/apt/lists/* /wheels \
  20. && (apt-get autoremove -y; apt-get autoclean -y)
  21. # get model and labels
  22. 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
  23. COPY labelmap.txt /labelmap.txt
  24. RUN wget -q https://github.com/google-coral/edgetpu/raw/master/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"]