Dockerfile.base 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. ARG ARCH=amd64
  2. ARG WHEELS_VERSION
  3. ARG FFMPEG_VERSION
  4. ARG NGINX_VERSION
  5. FROM blakeblackshear/frigate-wheels:${WHEELS_VERSION}-${ARCH} as wheels
  6. FROM blakeblackshear/frigate-ffmpeg:${FFMPEG_VERSION}-${ARCH} as ffmpeg
  7. FROM blakeblackshear/frigate-nginx:${NGINX_VERSION} as nginx
  8. FROM frigate-web as web
  9. FROM ubuntu:20.04
  10. LABEL maintainer "blakeb@blakeshome.com"
  11. COPY --from=ffmpeg /usr/local /usr/local/
  12. COPY --from=wheels /wheels/. /wheels/
  13. ENV FLASK_ENV=development
  14. # ENV FONTCONFIG_PATH=/etc/fonts
  15. ENV DEBIAN_FRONTEND=noninteractive
  16. # Install packages for apt repo
  17. RUN apt-get -qq update \
  18. && apt-get upgrade -y \
  19. && apt-get -qq install --no-install-recommends -y gnupg wget unzip tzdata libxml2 \
  20. && apt-get -qq install --no-install-recommends -y python3-pip \
  21. && pip3 install -U /wheels/*.whl \
  22. && APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn apt-key adv --fetch-keys https://packages.cloud.google.com/apt/doc/apt-key.gpg \
  23. && echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" > /etc/apt/sources.list.d/coral-edgetpu.list \
  24. && echo "libedgetpu1-max libedgetpu/accepted-eula select true" | debconf-set-selections \
  25. && apt-get -qq update && apt-get -qq install --no-install-recommends -y libedgetpu1-max python3-tflite-runtime python3-pycoral \
  26. && rm -rf /var/lib/apt/lists/* /wheels \
  27. && (apt-get autoremove -y; apt-get autoclean -y)
  28. RUN pip3 install \
  29. peewee_migrate \
  30. pydantic \
  31. zeroconf \
  32. ws4py
  33. COPY --from=nginx /usr/local/nginx/ /usr/local/nginx/
  34. # get model and labels
  35. COPY labelmap.txt /labelmap.txt
  36. RUN wget -q https://github.com/google-coral/test_data/raw/release-frogfish/ssdlite_mobiledet_coco_qat_postprocess_edgetpu.tflite -O /edgetpu_model.tflite
  37. RUN wget -q https://github.com/google-coral/test_data/raw/release-frogfish/ssdlite_mobiledet_coco_qat_postprocess.tflite -O /cpu_model.tflite
  38. WORKDIR /opt/frigate/
  39. ADD frigate frigate/
  40. ADD migrations migrations/
  41. COPY --from=web /opt/frigate/build web/
  42. COPY docker/rootfs/ /
  43. EXPOSE 5000
  44. EXPOSE 1935