1+
2+ install_tensorrt_rtx () {
3+ if [[ ${USE_TRT_RTX} == true ]]; then
4+ TRT_RTX_VERSION=1.0.0.21
5+ install_wheel_or_not=${1:- false}
6+ echo " It is the tensorrt-rtx build, install tensorrt-rtx with install_wheel_or_not:${install_wheel_or_not} "
7+ PLATFORM=$( python -c " import sys; print(sys.platform)" )
8+ echo " PLATFORM: $PLATFORM "
9+ # PYTHON_VERSION is always set in the CI environment, add this check for local testing
10+ if [ -z " $PYTHON_VERSION " ]; then
11+ echo " Error: PYTHON_VERSION environment variable is not set or empty. example format: export PYTHON_VERSION=3.11"
12+ exit 1
13+ fi
14+
15+ # python version is like 3.11, we need to convert it to cp311
16+ CPYTHON_TAG=" cp${PYTHON_VERSION// ./ } "
17+ if [[ ${PLATFORM} == win32 ]]; then
18+ curl -L https://developer.nvidia.com/downloads/trt/rtx_sdk/secure/1.0/TensorRT-RTX-${TRT_RTX_VERSION} .Windows.win10.cuda-12.9.zip -o TensorRT-RTX-${TRT_RTX_VERSION} .Windows.win10.cuda-12.9.zip
19+ unzip TensorRT-RTX-${TRT_RTX_VERSION} .Windows.win10.cuda-12.9.zip
20+ rtx_lib_dir=${PWD} /TensorRT-RTX-${TRT_RTX_VERSION} /lib
21+ export PATH=${rtx_lib_dir} :$PATH
22+ echo " PATH: $PATH "
23+ if [[ ${install_wheel_or_not} == true ]]; then
24+ pip install TensorRT-RTX-${TRT_RTX_VERSION} /python/tensorrt_rtx-${TRT_RTX_VERSION} -${CPYTHON_TAG} -none-win_amd64.whl
25+ fi
26+ else
27+ curl -L https://developer.nvidia.com/downloads/trt/rtx_sdk/secure/1.0/TensorRT-RTX-${TRT_RTX_VERSION} .Linux.x86_64-gnu.cuda-12.9.tar.gz -o TensorRT-RTX-${TRT_RTX_VERSION} .Linux.x86_64-gnu.cuda-12.9.tar.gz
28+ tar -xzf TensorRT-RTX-${TRT_RTX_VERSION} .Linux.x86_64-gnu.cuda-12.9.tar.gz
29+ rtx_lib_dir=${PWD} /TensorRT-RTX-${TRT_RTX_VERSION} /lib
30+ export LD_LIBRARY_PATH=${rtx_lib_dir} :$LD_LIBRARY_PATH
31+ echo " LD_LIBRARY_PATH: $LD_LIBRARY_PATH "
32+ if [[ ${install_wheel_or_not} == true ]]; then
33+ pip install TensorRT-RTX-${TRT_RTX_VERSION} /python/tensorrt_rtx-${TRT_RTX_VERSION} -${CPYTHON_TAG} -none-linux_x86_64.whl
34+ fi
35+ fi
36+ else
37+ echo " It is the standard tensorrt build, skip install tensorrt-rtx"
38+ fi
39+
40+ }
0 commit comments