Skip to content

Commit b4ecea7

Browse files
authored
Update models generation script (#8567)
1 parent 2cd8f61 commit b4ecea7

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

qa/common/gen_qa_model_repository

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ chmod -R 777 $TRITON_MDLS_QA_TRT_DATA_DEPENDENT_MODEL
344344
if [ -d "/usr/src/tensorrt/samples/python/onnx_custom_plugin" ]; then
345345
cd /usr/src/tensorrt/samples/python/onnx_custom_plugin
346346
else
347-
git clone -b release/\${TRT_VERSION%.*.*} --depth 1 https://github.com/NVIDIA/TensorRT.git /workspace/TensorRT
347+
git clone -b release/\$( echo \$TRT_VERSION | cut -d . -f -2) --depth 1 https://github.com/NVIDIA/TensorRT.git /workspace/TensorRT
348348
cd /workspace/TensorRT/samples/python/onnx_custom_plugin
349349
fi
350350
rm -rf build && mkdir build && \
@@ -569,28 +569,48 @@ elif [ "$TRITON_MODELS_USE_ENROOT" -eq 1 ] && which enroot ; then
569569
enroot create --name openvino.ubuntu.$CI_JOB_ID /tmp/ubuntu.$CI_JOB_ID.enroot.sqsh
570570
log_message.info "enroot start: openvino.ubuntu.$CI_JOB_ID"
571571
enroot start --root --rw -m /tmp:/tmp openvino.ubuntu.$CI_JOB_ID bash -xe $TRITON_MDLS_SRC_DIR/$OPENVINOSCRIPT
572+
if [ $? -ne 0 ]; then
573+
log_message.error "enroot start: ${OPENVINOSCRIPT} failed"
574+
exit 1
575+
fi
572576

573577

574578
log_message.status "enroot create: onnxruntime.ubuntu.$CI_JOB_ID"
575579
enroot create --name onnxruntime.ubuntu.$CI_JOB_ID /tmp/ubuntu.$CI_JOB_ID.enroot.sqsh
576580
log_message.info "enroot start: onnxruntime.ubuntu.$CI_JOB_ID"
577581
enroot start --root --rw -m /tmp:/tmp onnxruntime.ubuntu.$CI_JOB_ID bash -xe $TRITON_MDLS_SRC_DIR/$ONNXSCRIPT
582+
if [ $? -ne 0 ]; then
583+
log_message.error "enroot start: ${ONNXSCRIPT} failed"
584+
exit 1
585+
fi
578586

579587

580588
log_message.status "enroot import: $PYTORCH_IMAGE to /tmp/pytorch.$CI_JOB_ID.enroot.sqsh"
581589
enroot import --output /tmp/pytorch.$CI_JOB_ID.enroot.sqsh docker://$PYTORCH_IMAGE
590+
if [ $? -ne 0 ]; then
591+
log_message.error "enroot import: ${PYTORCH_IMAGE} failed"
592+
exit 1
593+
fi
582594

583595
log_message.status "enroot create: pytorch.$CI_JOB_ID"
584596
enroot create --name pytorch.$CI_JOB_ID /tmp/pytorch.$CI_JOB_ID.enroot.sqsh
585597
log_message.status "enroot start: pytorch.$CI_JOB_ID"
586598
enroot start --rw -m /tmp:/tmp pytorch.$CI_JOB_ID bash -xe $TRITON_MDLS_SRC_DIR/$TORCHSCRIPT
599+
if [ $? -ne 0 ]; then
600+
log_message.error "enroot start: ${TORCHSCRIPT} failed"
601+
exit 1
602+
fi
587603

588604
log_message.status "enroot import: $TENSORRT_IMAGE to /tmp/tensorrt.$CI_JOB_ID.enroot.sqsh"
589605
enroot import --output /tmp/tensorrt.$CI_JOB_ID.enroot.sqsh docker://$TENSORRT_IMAGE
590606
log_message.status "enroot create: tensorrt.$CI_JOB_ID"
591607
enroot create --name tensorrt.$CI_JOB_ID /tmp/tensorrt.$CI_JOB_ID.enroot.sqsh
592608
log_message.status "enroot start: tensorrt.$CI_JOB_ID"
593609
enroot start --rw -m /tmp:/tmp tensorrt.$CI_JOB_ID bash -xe $TRITON_MDLS_SRC_DIR/$TRTSCRIPT
610+
if [ $? -ne 0 ]; then
611+
log_message.error "enroot start: ${TRTSCRIPT} failed"
612+
exit 1
613+
fi
594614

595615
else
596616
log_message.warning "Neither Docker nor NVIDIA Enroot is installed." ;

0 commit comments

Comments
 (0)