mirror of
https://github.com/koush/scrypted.git
synced 2026-02-10 09:12:03 +00:00
136 lines
5.1 KiB
Docker
136 lines
5.1 KiB
Docker
################################################################
|
|
# THIS FILE IS GENERATED. DO NOT EDIT.
|
|
################################################################
|
|
################################################################
|
|
# Begin section generated from template/Dockerfile.full.header
|
|
# This common file will be used by both Docker and the linux
|
|
# install script.
|
|
################################################################
|
|
ARG BASE="jammy"
|
|
FROM ubuntu:${BASE} as header
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# base tools and development stuff
|
|
RUN apt-get update && apt-get -y install \
|
|
curl software-properties-common apt-utils \
|
|
build-essential \
|
|
cmake \
|
|
ffmpeg \
|
|
gcc \
|
|
libcairo2-dev \
|
|
libgirepository1.0-dev \
|
|
pkg-config && \
|
|
apt-get -y update && \
|
|
apt-get -y upgrade
|
|
|
|
ARG NODE_VERSION=18
|
|
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash -
|
|
RUN apt-get update && apt-get install -y nodejs
|
|
|
|
# python native
|
|
RUN apt-get -y install \
|
|
python3 \
|
|
python3-dev \
|
|
python3-pip \
|
|
python3-setuptools \
|
|
python3-wheel
|
|
|
|
# Coral Edge TPU
|
|
# https://coral.ai/docs/accelerator/get-started/#runtime-on-linux
|
|
RUN echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | tee /etc/apt/sources.list.d/coral-edgetpu.list
|
|
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
|
|
RUN apt-get -y update && apt-get -y install libedgetpu1-std
|
|
|
|
# these are necessary for pillow-simd, additional on disk size is small
|
|
# but could consider removing this.
|
|
RUN apt-get -y install \
|
|
libjpeg-dev zlib1g-dev
|
|
|
|
# plugins support fallback to pillow, but vips is faster.
|
|
RUN apt-get -y install \
|
|
libvips
|
|
|
|
# gstreamer native https://gstreamer.freedesktop.org/documentation/installing/on-linux.html?gi-language=c#install-gstreamer-on-ubuntu-or-debian
|
|
RUN apt-get -y install \
|
|
gstreamer1.0-tools gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-alsa \
|
|
gstreamer1.0-vaapi
|
|
|
|
# python3 gstreamer bindings
|
|
RUN apt-get -y install \
|
|
python3-gst-1.0
|
|
|
|
# python 3.9 from ppa.
|
|
# 3.9 is the version with prebuilt support for tensorflow lite
|
|
RUN add-apt-repository ppa:deadsnakes/ppa && \
|
|
apt-get -y install \
|
|
python3.9 \
|
|
python3.9-dev \
|
|
python3.9-distutils
|
|
|
|
# armv7l does not have wheels for any of these
|
|
# and compile times would forever, if it works at all.
|
|
# furthermore, it's possible to run 32bit docker on 64bit arm,
|
|
# which causes weird behavior in python which looks at the arch version
|
|
# which still reports 64bit, even if running in 32bit docker.
|
|
# this scenario is not supported and will be reported at runtime.
|
|
# this bit is not necessary on amd64, but leaving it for consistency.
|
|
RUN apt-get -y install \
|
|
python3-matplotlib \
|
|
python3-numpy \
|
|
python3-opencv \
|
|
python3-pil \
|
|
python3-skimage
|
|
|
|
# python pip
|
|
RUN rm -f /usr/lib/python**/EXTERNALLY-MANAGED
|
|
|
|
# pyvips is broken on x86 due to mismatch ffi
|
|
# https://stackoverflow.com/questions/62658237/it-seems-that-the-version-of-the-libffi-library-seen-at-runtime-is-different-fro
|
|
|
|
RUN rm -f /usr/lib/python**/EXTERNALLY-MANAGED
|
|
RUN python3 -m pip install --upgrade pip
|
|
RUN python3 -m pip install --force-reinstall --no-binary :all: cffi
|
|
RUN python3 -m pip install debugpy typing_extensions psutil
|
|
|
|
RUN python3.9 -m pip install --upgrade pip
|
|
RUN python3.9 -m pip install --force-reinstall --no-binary :all: cffi
|
|
RUN python3.9 -m pip install debugpy typing_extensions psutil
|
|
|
|
################################################################
|
|
# End section generated from template/Dockerfile.full.header
|
|
################################################################
|
|
################################################################
|
|
# Begin section generated from template/Dockerfile.full.footer
|
|
################################################################
|
|
FROM header as base
|
|
|
|
# intel opencl gpu for openvino
|
|
RUN bash -c "if [ \"$(uname -m)\" == \"x86_64\" ]; \
|
|
then \
|
|
apt-get update && apt-get install -y gpg-agent && \
|
|
rm -f /usr/share/keyrings/intel-graphics.gpg && \
|
|
curl -L https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg && \
|
|
echo 'deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy arc' | tee /etc/apt/sources.list.d/intel.gpu.jammy.list && \
|
|
apt-get -y update && \
|
|
apt-get -y install intel-opencl-icd intel-media-va-driver-non-free && \
|
|
apt-get -y dist-upgrade; \
|
|
fi"
|
|
|
|
ENV SCRYPTED_INSTALL_ENVIRONMENT="docker"
|
|
ENV SCRYPTED_CAN_RESTART="true"
|
|
ENV SCRYPTED_VOLUME="/server/volume"
|
|
ENV SCRYPTED_INSTALL_PATH="/server"
|
|
|
|
RUN test -f "/usr/bin/ffmpeg"
|
|
ENV SCRYPTED_FFMPEG_PATH="/usr/bin/ffmpeg"
|
|
|
|
# changing this forces pip and npm to perform reinstalls.
|
|
# if this base image changes, this version must be updated.
|
|
ENV SCRYPTED_BASE_VERSION="20230608"
|
|
ENV SCRYPTED_DOCKER_FLAVOR="full"
|
|
|
|
################################################################
|
|
# End section generated from template/Dockerfile.full.footer
|
|
################################################################
|