mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-10 10:33:11 +03:00
https://gist.github.com/Brainiarc7/4b49f463a08377530df6cecb8171306a ffmpeg -hwaccels ffmpeg version 4.3-2ubuntu0~18.04.sav0 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04) configuration: --prefix=/usr --extra-version='2ubuntu0~18.04.sav0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-crystalhd --enable-libmfx --enable-nvenc --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 51.100 / 56. 51.100 libavcodec 58. 91.100 / 58. 91.100 libavformat 58. 45.100 / 58. 45.100 libavdevice 58. 10.100 / 58. 10.100 libavfilter 7. 85.100 / 7. 85.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 7.100 / 5. 7.100 libswresample 3. 7.100 / 3. 7.100 libpostproc 55. 7.100 / 55. 7.100 Hardware acceleration methods: vdpau cuda vaapi qsv drm opencl
63 lines
2.6 KiB
Docker
Executable File
63 lines
2.6 KiB
Docker
Executable File
FROM ubuntu:18.04
|
|
LABEL maintainer "blakeb@blakeshome.com"
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
# Install packages for apt repo
|
|
RUN apt -qq update && apt -qq install --no-install-recommends -y \
|
|
software-properties-common \
|
|
# apt-transport-https ca-certificates \
|
|
build-essential \
|
|
gnupg wget unzip tzdata \
|
|
# libcap-dev \
|
|
&& add-apt-repository ppa:deadsnakes/ppa -y \
|
|
&& apt -qq install --no-install-recommends -y \
|
|
&& add-apt-repository ppa:savoury1/ffmpeg4 -y \
|
|
&& add-apt-repository ppa:savoury1/graphics -y \
|
|
&& add-apt-repository ppa:savoury1/multimedia -y \
|
|
python3.7 \
|
|
python3.7-dev \
|
|
python3-pip \
|
|
ffmpeg \
|
|
# VAAPI drivers for Intel hardware accel
|
|
libva-drm2 libva2 i965-va-driver vainfo \
|
|
&& python3.7 -m pip install -U wheel setuptools \
|
|
&& python3.7 -m pip install -U \
|
|
opencv-python-headless \
|
|
# python-prctl \
|
|
numpy \
|
|
imutils \
|
|
scipy \
|
|
&& python3.7 -m pip install -U \
|
|
Flask \
|
|
paho-mqtt \
|
|
PyYAML \
|
|
matplotlib \
|
|
pyarrow \
|
|
&& echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" > /etc/apt/sources.list.d/coral-edgetpu.list \
|
|
&& wget -q -O - https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - \
|
|
&& apt -qq update \
|
|
&& echo "libedgetpu1-max libedgetpu/accepted-eula boolean true" | debconf-set-selections \
|
|
&& apt -qq install --no-install-recommends -y \
|
|
libedgetpu1-max \
|
|
## Tensorflow lite (python 3.7 only)
|
|
&& wget -q https://dl.google.com/coral/python/tflite_runtime-2.1.0.post1-cp37-cp37m-linux_x86_64.whl \
|
|
&& python3.7 -m pip install tflite_runtime-2.1.0.post1-cp37-cp37m-linux_x86_64.whl \
|
|
&& rm tflite_runtime-2.1.0.post1-cp37-cp37m-linux_x86_64.whl \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& (apt-get autoremove -y; apt-get autoclean -y)
|
|
|
|
# get model and labels
|
|
RUN wget -q https://github.com/google-coral/edgetpu/raw/master/test_data/mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite -O /edgetpu_model.tflite --trust-server-names
|
|
RUN wget -q https://dl.google.com/coral/canned_models/coco_labels.txt -O /labelmap.txt --trust-server-names
|
|
RUN wget -q https://storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip -O /cpu_model.zip && \
|
|
unzip /cpu_model.zip detect.tflite -d / && \
|
|
mv /detect.tflite /cpu_model.tflite && \
|
|
rm /cpu_model.zip
|
|
|
|
WORKDIR /opt/frigate/
|
|
ADD frigate frigate/
|
|
COPY detect_objects.py .
|
|
COPY benchmark.py .
|
|
|
|
CMD ["python3.7", "-u", "detect_objects.py"]
|