Pin `tensorrt<=10.1.0` to fix `libnvinfer_builder_resource_win.so.10.2.0` error (#14239)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
pull/14248/head
Glenn Jocher 4 months ago committed by GitHub
parent 26a664f636
commit 209f90b35c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      docker/Dockerfile
  2. 2
      docker/Dockerfile-arm64
  3. 2
      docker/Dockerfile-cpu
  4. 2
      docker/Dockerfile-jetson-jetpack5
  5. 2
      docker/Dockerfile-python
  6. 2
      ultralytics/engine/exporter.py
  7. 2
      ultralytics/nn/autobackend.py

@ -4,7 +4,6 @@
# Start FROM PyTorch image https://hub.docker.com/r/pytorch/pytorch or nvcr.io/nvidia/pytorch:23.03-py3 # Start FROM PyTorch image https://hub.docker.com/r/pytorch/pytorch or nvcr.io/nvidia/pytorch:23.03-py3
FROM pytorch/pytorch:2.3.1-cuda12.1-cudnn8-runtime FROM pytorch/pytorch:2.3.1-cuda12.1-cudnn8-runtime
RUN pip install --no-cache-dir tensorrt
# Set environment variables # Set environment variables
ENV APP_HOME /usr/src/ultralytics ENV APP_HOME /usr/src/ultralytics
@ -20,7 +19,7 @@ ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \
# g++ required to build 'tflite_support' and 'lap' packages, libusb-1.0-0 required for 'tflite_support' package # g++ required to build 'tflite_support' and 'lap' packages, libusb-1.0-0 required for 'tflite_support' package
# libsm6 required by libqxcb to create QT-based windows for visualization; set 'QT_DEBUG_PLUGINS=1' to test in docker # libsm6 required by libqxcb to create QT-based windows for visualization; set 'QT_DEBUG_PLUGINS=1' to test in docker
RUN apt update \ RUN apt update \
&& apt install --no-install-recommends -y gcc git zip unzip curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 libsm6 && apt install --no-install-recommends -y gcc git zip unzip wget curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 libsm6
# Security updates # Security updates
# https://security.snyk.io/vuln/SNYK-UBUNTU1804-OPENSSL-3314796 # https://security.snyk.io/vuln/SNYK-UBUNTU1804-OPENSSL-3314796

@ -18,7 +18,7 @@ ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \
# g++ required to build 'tflite_support' and 'lap' packages, libusb-1.0-0 required for 'tflite_support' package # g++ required to build 'tflite_support' and 'lap' packages, libusb-1.0-0 required for 'tflite_support' package
# pkg-config and libhdf5-dev (not included) are needed to build 'h5py==3.11.0' aarch64 wheel required by 'tensorflow' # pkg-config and libhdf5-dev (not included) are needed to build 'h5py==3.11.0' aarch64 wheel required by 'tensorflow'
RUN apt update \ RUN apt update \
&& apt install --no-install-recommends -y python3-pip git zip unzip curl htop gcc libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 && apt install --no-install-recommends -y python3-pip git zip unzip wget curl htop gcc libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0
# Create working directory # Create working directory
WORKDIR $APP_HOME WORKDIR $APP_HOME

@ -16,7 +16,7 @@ ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \
# Install linux packages # Install linux packages
# g++ required to build 'tflite_support' and 'lap' packages, libusb-1.0-0 required for 'tflite_support' package # g++ required to build 'tflite_support' and 'lap' packages, libusb-1.0-0 required for 'tflite_support' package
RUN apt update \ RUN apt update \
&& apt install --no-install-recommends -y python3-pip git zip unzip curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 && apt install --no-install-recommends -y python3-pip git zip unzip wget curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0
# Create working directory # Create working directory
WORKDIR $APP_HOME WORKDIR $APP_HOME

@ -18,7 +18,7 @@ ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \
# libusb-1.0-0 required for 'tflite_support' package when exporting to TFLite # libusb-1.0-0 required for 'tflite_support' package when exporting to TFLite
# pkg-config and libhdf5-dev (not included) are needed to build 'h5py==3.11.0' aarch64 wheel required by 'tensorflow' # pkg-config and libhdf5-dev (not included) are needed to build 'h5py==3.11.0' aarch64 wheel required by 'tensorflow'
RUN apt update \ RUN apt update \
&& apt install --no-install-recommends -y gcc git zip unzip curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 && apt install --no-install-recommends -y gcc git zip unzip wget curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0
# Create working directory # Create working directory
WORKDIR $APP_HOME WORKDIR $APP_HOME

@ -16,7 +16,7 @@ ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \
# Install linux packages # Install linux packages
# g++ required to build 'tflite_support' and 'lap' packages, libusb-1.0-0 required for 'tflite_support' package # g++ required to build 'tflite_support' and 'lap' packages, libusb-1.0-0 required for 'tflite_support' package
RUN apt update \ RUN apt update \
&& apt install --no-install-recommends -y python3-pip git zip unzip curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 && apt install --no-install-recommends -y python3-pip git zip unzip wget curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0
# Create working directory # Create working directory
WORKDIR $APP_HOME WORKDIR $APP_HOME

@ -686,7 +686,7 @@ class Exporter:
import tensorrt as trt # noqa import tensorrt as trt # noqa
except ImportError: except ImportError:
if LINUX: if LINUX:
check_requirements("tensorrt", cmds="-U") check_requirements("tensorrt>7.0.0,<=10.1.0")
import tensorrt as trt # noqa import tensorrt as trt # noqa
check_version(trt.__version__, "7.0.0", hard=True) # require tensorrt>=7.0.0 check_version(trt.__version__, "7.0.0", hard=True) # require tensorrt>=7.0.0

@ -225,7 +225,7 @@ class AutoBackend(nn.Module):
import tensorrt as trt # noqa https://developer.nvidia.com/nvidia-tensorrt-download import tensorrt as trt # noqa https://developer.nvidia.com/nvidia-tensorrt-download
except ImportError: except ImportError:
if LINUX: if LINUX:
check_requirements("tensorrt", cmds="-U") check_requirements("tensorrt>7.0.0,<=10.1.0")
import tensorrt as trt # noqa import tensorrt as trt # noqa
check_version(trt.__version__, "7.0.0", hard=True) # require tensorrt>=7.0.0 check_version(trt.__version__, "7.0.0", hard=True) # require tensorrt>=7.0.0
if device.type == "cpu": if device.type == "cpu":

Loading…
Cancel
Save