ARG ARCH=amd64 ARG WHEELS_VERSION ARG NGINX_VERSION ARG BASE_IMAGE=ubuntu:20.04 FROM blakeblackshear/frigate-wheels:${WHEELS_VERSION}-${ARCH} as wheels FROM blakeblackshear/frigate-nginx:${NGINX_VERSION} as nginx FROM frigate-web as web FROM ${BASE_IMAGE} LABEL maintainer "blakeb@blakeshome.com" COPY --from=wheels /wheels/. /wheels/ ENV FLASK_ENV=development # ENV FONTCONFIG_PATH=/etc/fonts ENV DEBIAN_FRONTEND=noninteractive # install jellyfin-ffmpeg RUN apt-get update && apt-get install -y wget libmysofa1 libpostproc55 librubberband2 libvidstab1.1 libzmq5 \ libcdio-cdda2 libcdio-paranoia2 libxcb-shape0 libnorm1 libpgm-5.2-0 libsodium23 libass9 libbs2b0 libflite1 liblilv-0-0 \ libavc1394-0 libcaca0 libiec61883-0 libjack-jackd2-0 libopenal1 libpulse0 libsdl2-2.0-0 libsndio7.0 libxv1 libavresample4 #ffmpeg arch: arm64, amd64, armhf ARG FFMPEG_ARCH=arm64 ENV FFMPEG_VERSION=4.2.4 RUN wget https://launchpad.net/ubuntu/+archive/primary/+files/libavutil56_${FFMPEG_VERSION}-1ubuntu0.1_${FFMPEG_ARCH}.deb && dpkg -i libavutil56_${FFMPEG_VERSION}-1ubuntu0.1_${FFMPEG_ARCH}.deb && \ wget https://launchpad.net/ubuntu/+archive/primary/+files/libavcodec58_${FFMPEG_VERSION}-1ubuntu0.1_${FFMPEG_ARCH}.deb && dpkg -i libavcodec58_${FFMPEG_VERSION}-1ubuntu0.1_${FFMPEG_ARCH}.deb && \ wget https://launchpad.net/ubuntu/+archive/primary/+files/libavfilter7_${FFMPEG_VERSION}-1ubuntu0.1_${FFMPEG_ARCH}.deb && dpkg -i libavfilter7_${FFMPEG_VERSION}-1ubuntu0.1_${FFMPEG_ARCH}.deb && \ wget https://launchpad.net/ubuntu/+archive/primary/+files/libavdevice58_${FFMPEG_VERSION}-1ubuntu0.1_${FFMPEG_ARCH}.deb && dpkg -i libavdevice58_${FFMPEG_VERSION}-1ubuntu0.1_${FFMPEG_ARCH}.deb && \ wget https://launchpad.net/ubuntu/+archive/primary/+files/ffmpeg_${FFMPEG_VERSION}-1ubuntu0.1_${FFMPEG_ARCH}.deb && dpkg -i ffmpeg_${FFMPEG_VERSION}-1ubuntu0.1_${FFMPEG_ARCH}.deb && \ rm *.deb # Install packages for apt repo RUN apt-get -qq update \ && apt-get upgrade -y \ && apt-get -qq install --no-install-recommends -y gnupg wget unzip tzdata libxml2 \ && apt-get -qq install --no-install-recommends -y python3-pip \ && pip3 install -U /wheels/*.whl \ && APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn apt-key adv --fetch-keys https://packages.cloud.google.com/apt/doc/apt-key.gpg \ && echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" > /etc/apt/sources.list.d/coral-edgetpu.list \ && echo "libedgetpu1-max libedgetpu/accepted-eula select true" | debconf-set-selections \ && apt-get -qq update && apt-get -qq install --no-install-recommends -y libedgetpu1-max python3-tflite-runtime python3-pycoral \ && rm -rf /var/lib/apt/lists/* /wheels \ && (apt-get autoremove -y; apt-get autoclean -y) RUN pip3 install \ peewee_migrate \ pydantic \ zeroconf \ ws4py RUN \ apt-get update && apt-get install -y gstreamer1.0-plugins-base-apps gstreamer1.0-tools gstreamer1.0-alsa \ gstreamer1.0-plugins-base gstreamer1.0-plugins-good \ gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \ ibgstreamer1.0-dev \ libgstreamer-plugins-base1.0-dev \ libgstreamer-plugins-good1.0-dev \ libgstreamer-plugins-bad1.0-dev COPY --from=nginx /usr/local/nginx/ /usr/local/nginx/ # get model and labels COPY labelmap.txt /labelmap.txt RUN wget -q https://github.com/google-coral/test_data/raw/release-frogfish/ssdlite_mobiledet_coco_qat_postprocess_edgetpu.tflite -O /edgetpu_model.tflite RUN wget -q https://github.com/google-coral/test_data/raw/release-frogfish/ssdlite_mobiledet_coco_qat_postprocess.tflite -O /cpu_model.tflite WORKDIR /opt/frigate/ ADD frigate frigate/ ADD migrations migrations/ COPY --from=web /opt/frigate/build web/ COPY docker/rootfs/ / EXPOSE 5000 EXPOSE 1935