hass-core/virtualization/Docker/setup_docker_prereqs
Jason Hunter 7ccd0bba9a Live Streams Component (#21473)
* initial commit of streams

* refactor stream component

* refactor so stream formats are not considered a platform

* initial test and minor refactor

* fix linting

* update requirements

* need av in tests as well

* fix import in class def vs method

* fix travis and docker builds

* address code review comments

* fix logger, add stream start/stop logs, listen to HASS stop

* address additional code review comments

* beef up tests

* fix tests

* fix lint

* add stream_source to onvif camera

* address pr comments

* add keepalive to camera play_stream service

* remove keepalive and move import

* implement registry and have output provider remove itself from stream after idle, set libav log level to error
2019-03-11 19:57:10 -07:00

79 lines
2.2 KiB
Bash
Executable file

#!/bin/bash
# Install requirements and build dependencies for Home Assistant in Docker.
# Stop on errors
set -e
INSTALL_TELLSTICK="${INSTALL_TELLSTICK:-yes}"
INSTALL_OPENALPR="${INSTALL_OPENALPR:-yes}"
INSTALL_LIBCEC="${INSTALL_LIBCEC:-yes}"
INSTALL_SSOCR="${INSTALL_SSOCR:-yes}"
INSTALL_DLIB="${INSTALL_DLIB:-yes}"
# Required debian packages for running hass or components
PACKAGES=(
# build-essential is required for python pillow module on non-x86_64 arch
build-essential
# homeassistant.components.image_processing.openalpr_local
libxrandr-dev
# homeassistant.components.device_tracker.nmap_tracker
nmap net-tools libcurl3-dev
# homeassistant.components.device_tracker.bluetooth_tracker
bluetooth libglib2.0-dev libbluetooth-dev
# homeassistant.components.device_tracker.owntracks
libsodium18
# homeassistant.components.zwave
libudev-dev
# homeassistant.components.homekit_controller
libmpc-dev libmpfr-dev libgmp-dev
# homeassistant.components.ffmpeg
ffmpeg
# homeassistant.components.stream
libavformat-dev libavcodec-dev libavdevice-dev
libavutil-dev libswscale-dev libswresample-dev libavfilter-dev
# homeassistant.components.sensor.iperf3
iperf3
)
# Required debian packages for building dependencies
PACKAGES_DEV=(
cmake
git
swig
)
# Install packages
apt-get update
apt-get install -y --no-install-recommends ${PACKAGES[@]} ${PACKAGES_DEV[@]}
# This is a list of scripts that install additional dependencies. If you only
# need to install a package from the official debian repository, just add it
# to the list above. Only create a script if you need compiling, manually
# downloading or a 3rd party repository.
if [ "$INSTALL_TELLSTICK" == "yes" ]; then
virtualization/Docker/scripts/tellstick
fi
if [ "$INSTALL_OPENALPR" == "yes" ]; then
virtualization/Docker/scripts/openalpr
fi
if [ "$INSTALL_LIBCEC" == "yes" ]; then
virtualization/Docker/scripts/libcec
fi
if [ "$INSTALL_SSOCR" == "yes" ]; then
virtualization/Docker/scripts/ssocr
fi
if [ "$INSTALL_DLIB" == "yes" ]; then
pip3 install --no-cache-dir "dlib>=19.5"
fi
# Remove packages
apt-get remove -y --purge ${PACKAGES_DEV[@]}
apt-get -y --purge autoremove
# Cleanup
apt-get clean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/src/app/build/