File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -344,7 +344,18 @@ chmod -R 777 $TRITON_MDLS_QA_TRT_DATA_DEPENDENT_MODEL
344344if [ -d "/usr/src/tensorrt/samples/python/onnx_custom_plugin" ]; then
345345 cd /usr/src/tensorrt/samples/python/onnx_custom_plugin
346346else
347- git clone -b release/\$ ( echo \$ TRT_VERSION | cut -d . -f -2) --depth 1 https://github.com/NVIDIA/TensorRT.git /workspace/TensorRT
347+ TRT_BRANCH=\$ (echo \$ TRT_VERSION | cut -d . -f -2)
348+ if ! git clone -b release/\$ {TRT_BRANCH} --depth 1 https://github.com/NVIDIA/TensorRT.git /workspace/TensorRT; then
349+ MAJOR=\$ (echo "\$ TRT_BRANCH" | cut -d . -f 1)
350+ MINOR=\$ (echo "\$ TRT_BRANCH" | cut -d . -f 2)
351+ if [ -n "\$ MINOR" ] && [ "\$ MINOR" -gt 0 ] 2>/dev/null; then
352+ TRT_BRANCH="\$ {MAJOR}.\$ ((MINOR - 1))"
353+ echo "Fallback: cloning TensorRT release/\$ {TRT_BRANCH} (previous minor)"
354+ git clone -b release/\$ {TRT_BRANCH} --depth 1 https://github.com/NVIDIA/TensorRT.git /workspace/TensorRT
355+ else
356+ exit 1
357+ fi
358+ fi
348359 cd /workspace/TensorRT/samples/python/onnx_custom_plugin
349360fi
350361rm -rf build && mkdir build && \
You can’t perform that action at this time.
0 commit comments