mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-02-25 18:55:25 -06:00
use python 3.11 (rc1)
This commit is contained in:
parent
2a05429a6d
commit
f8fbc68f0d
@ -142,8 +142,8 @@ RUN apt-get -qq update \
|
|||||||
apt-transport-https wget \
|
apt-transport-https wget \
|
||||||
&& apt-get -qq update \
|
&& apt-get -qq update \
|
||||||
&& apt-get -qq install -y \
|
&& apt-get -qq install -y \
|
||||||
python3 \
|
python3.11 \
|
||||||
python3-dev \
|
python3.11-dev \
|
||||||
# opencv dependencies
|
# opencv dependencies
|
||||||
build-essential cmake git pkg-config libgtk-3-dev \
|
build-essential cmake git pkg-config libgtk-3-dev \
|
||||||
libavcodec-dev libavformat-dev libswscale-dev libv4l-dev \
|
libavcodec-dev libavformat-dev libswscale-dev libv4l-dev \
|
||||||
@ -157,6 +157,9 @@ RUN apt-get -qq update \
|
|||||||
gcc gfortran libopenblas-dev liblapack-dev && \
|
gcc gfortran libopenblas-dev liblapack-dev && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Ensure python3 defaults to python3.11
|
||||||
|
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
|
||||||
|
|
||||||
RUN wget -q https://bootstrap.pypa.io/get-pip.py -O get-pip.py \
|
RUN wget -q https://bootstrap.pypa.io/get-pip.py -O get-pip.py \
|
||||||
&& python3 get-pip.py "pip" --break-system-packages
|
&& python3 get-pip.py "pip" --break-system-packages
|
||||||
|
|
||||||
|
@ -11,8 +11,8 @@ apt-get -qq install --no-install-recommends -y \
|
|||||||
lbzip2 \
|
lbzip2 \
|
||||||
procps vainfo \
|
procps vainfo \
|
||||||
unzip locales tzdata libxml2 xz-utils \
|
unzip locales tzdata libxml2 xz-utils \
|
||||||
python3 \
|
python3.11 \
|
||||||
python3-pip \
|
python3.11-dev \
|
||||||
curl \
|
curl \
|
||||||
lsof \
|
lsof \
|
||||||
jq \
|
jq \
|
||||||
@ -21,6 +21,12 @@ apt-get -qq install --no-install-recommends -y \
|
|||||||
libglib2.0-0 \
|
libglib2.0-0 \
|
||||||
libusb-1.0.0
|
libusb-1.0.0
|
||||||
|
|
||||||
|
# Ensure python3 defaults to python3.11
|
||||||
|
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
|
||||||
|
|
||||||
|
wget -q https://bootstrap.pypa.io/get-pip.py -O get-pip.py \
|
||||||
|
&& python3 get-pip.py "pip"
|
||||||
|
|
||||||
mkdir -p -m 600 /root/.gnupg
|
mkdir -p -m 600 /root/.gnupg
|
||||||
|
|
||||||
# install coral runtime
|
# install coral runtime
|
||||||
@ -36,14 +42,8 @@ if [[ "${TARGETARCH}" == "amd64" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${TARGETARCH}" == "arm64" ]]; then
|
if [[ "${TARGETARCH}" == "arm64" ]]; then
|
||||||
if [ -e /usr/local/cuda-12.6 ]; then
|
|
||||||
# Assume Jetson (Python 3.10)
|
|
||||||
pip3 install --break-system-packages https://github.com/feranick/TFlite-builds/releases/download/v2.17.0/tflite_runtime-2.17.0-cp310-cp310-linux_aarch64.whl
|
|
||||||
pip3 install --break-system-packages https://github.com/feranick/pycoral/releases/download/2.0.2TF2.17.0/pycoral-2.0.2-cp310-cp310-linux_aarch64.whl
|
|
||||||
else
|
|
||||||
pip3 install --break-system-packages https://github.com/feranick/TFlite-builds/releases/download/v2.17.0/tflite_runtime-2.17.0-cp311-cp311-linux_aarch64.whl
|
pip3 install --break-system-packages https://github.com/feranick/TFlite-builds/releases/download/v2.17.0/tflite_runtime-2.17.0-cp311-cp311-linux_aarch64.whl
|
||||||
pip3 install --break-system-packages https://github.com/feranick/pycoral/releases/download/2.0.2TF2.17.0/pycoral-2.0.2-cp311-cp311-linux_aarch64.whl
|
pip3 install --break-system-packages https://github.com/feranick/pycoral/releases/download/2.0.2TF2.17.0/pycoral-2.0.2-cp311-cp311-linux_aarch64.whl
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# btbn-ffmpeg -> amd64
|
# btbn-ffmpeg -> amd64
|
||||||
|
@ -10,9 +10,15 @@ ARG DEBIAN_FRONTEND
|
|||||||
# Use a separate container to build wheels to prevent build dependencies in final image
|
# Use a separate container to build wheels to prevent build dependencies in final image
|
||||||
RUN apt-get -qq update \
|
RUN apt-get -qq update \
|
||||||
&& apt-get -qq install -y --no-install-recommends \
|
&& apt-get -qq install -y --no-install-recommends \
|
||||||
|
python3.11 python3.11-dev \
|
||||||
wget build-essential cmake git \
|
wget build-essential cmake git \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Ensure python3 defaults to python3.11
|
||||||
|
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
|
||||||
|
|
||||||
|
RUN wget -q https://bootstrap.pypa.io/get-pip.py -O get-pip.py \
|
||||||
|
&& python3 get-pip.py "pip"
|
||||||
|
|
||||||
FROM build-wheels AS trt-wheels
|
FROM build-wheels AS trt-wheels
|
||||||
ARG DEBIAN_FRONTEND
|
ARG DEBIAN_FRONTEND
|
||||||
@ -29,11 +35,11 @@ RUN --mount=type=bind,source=docker/tensorrt/detector/build_python_tensorrt.sh,t
|
|||||||
|
|
||||||
COPY docker/tensorrt/requirements-arm64.txt /requirements-tensorrt.txt
|
COPY docker/tensorrt/requirements-arm64.txt /requirements-tensorrt.txt
|
||||||
# See https://elinux.org/Jetson_Zoo#ONNX_Runtime
|
# See https://elinux.org/Jetson_Zoo#ONNX_Runtime
|
||||||
ADD https://nvidia.box.com/shared/static/6l0u97rj80ifwkk8rqbzj1try89fk26z.whl /tmp/onnxruntime_gpu-1.19.0-cp310-cp310-linux_aarch64.whl
|
ADD https://nvidia.box.com/shared/static/9yvw05k6u343qfnkhdv2x6xhygze0aq1.whl /tmp/onnxruntime_gpu-1.19.0-cp311-cp311-linux_aarch64.whl
|
||||||
|
|
||||||
RUN pip3 uninstall -y onnxruntime-openvino \
|
RUN pip3 uninstall -y onnxruntime-openvino \
|
||||||
&& pip3 wheel --wheel-dir=/trt-wheels -r /requirements-tensorrt.txt \
|
&& pip3 wheel --wheel-dir=/trt-wheels -r /requirements-tensorrt.txt \
|
||||||
&& pip3 install --no-deps /tmp/onnxruntime_gpu-1.19.0-cp310-cp310-linux_aarch64.whl
|
&& pip3 install --no-deps /tmp/onnxruntime_gpu-1.19.0-cp311-cp311-linux_aarch64.whl
|
||||||
|
|
||||||
FROM build-wheels AS trt-model-wheels
|
FROM build-wheels AS trt-model-wheels
|
||||||
ARG DEBIAN_FRONTEND
|
ARG DEBIAN_FRONTEND
|
||||||
|
@ -8,7 +8,7 @@ if [[ "${TARGETARCH}" == "arm64" ]]; then
|
|||||||
|
|
||||||
wget -q https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.3.0/tars/TensorRT-10.3.0.26.l4t.aarch64-gnu.cuda-12.6.tar.gz -O TensorRT.tar.gz
|
wget -q https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.3.0/tars/TensorRT-10.3.0.26.l4t.aarch64-gnu.cuda-12.6.tar.gz -O TensorRT.tar.gz
|
||||||
tar -zxf TensorRT.tar.gz
|
tar -zxf TensorRT.tar.gz
|
||||||
mv TensorRT-10.3.0.26/python/tensorrt-10.3.0-cp310-none-linux_aarch64.whl /trt-wheels/
|
mv TensorRT-10.3.0.26/python/tensorrt-10.3.0-cp311-none-linux_aarch64.whl /trt-wheels/
|
||||||
rm -rf TensorRT-10.3.0.26
|
rm -rf TensorRT-10.3.0.26
|
||||||
rm -rf TensorRT.tar.gz
|
rm -rf TensorRT.tar.gz
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user