use python 3.11 (rc1)

This commit is contained in:
Lander Noterman 2025-02-13 15:55:04 +01:00
parent 2a05429a6d
commit f8fbc68f0d
4 changed files with 24 additions and 15 deletions

View File

@ -142,8 +142,8 @@ RUN apt-get -qq update \
apt-transport-https wget \
&& apt-get -qq update \
&& apt-get -qq install -y \
python3 \
python3-dev \
python3.11 \
python3.11-dev \
# opencv dependencies
build-essential cmake git pkg-config libgtk-3-dev \
libavcodec-dev libavformat-dev libswscale-dev libv4l-dev \
@ -157,6 +157,9 @@ RUN apt-get -qq update \
gcc gfortran libopenblas-dev liblapack-dev && \
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" --break-system-packages

View File

@ -11,8 +11,8 @@ apt-get -qq install --no-install-recommends -y \
lbzip2 \
procps vainfo \
unzip locales tzdata libxml2 xz-utils \
python3 \
python3-pip \
python3.11 \
python3.11-dev \
curl \
lsof \
jq \
@ -21,6 +21,12 @@ apt-get -qq install --no-install-recommends -y \
libglib2.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
# install coral runtime
@ -36,14 +42,8 @@ if [[ "${TARGETARCH}" == "amd64" ]]; then
fi
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/pycoral/releases/download/2.0.2TF2.17.0/pycoral-2.0.2-cp311-cp311-linux_aarch64.whl
fi
fi
# btbn-ffmpeg -> amd64

View File

@ -10,9 +10,15 @@ ARG DEBIAN_FRONTEND
# Use a separate container to build wheels to prevent build dependencies in final image
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends \
python3.11 python3.11-dev \
wget build-essential cmake git \
&& 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
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
# 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 \
&& 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
ARG DEBIAN_FRONTEND

View File

@ -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
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.tar.gz