Skip to content

Commit bba8e7a

Browse files
committed
Use the docker image to generate TRT models
1 parent 3ee3f6a commit bba8e7a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

qa/common/run_trt_model_generation.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,14 @@ chmod -R 777 $FORMATDESTDIR
113113
python3 $SRCDIR/gen_qa_trt_data_dependent_shape.py --models_dir=$DATADEPENDENTDIR
114114
chmod -R 777 $DATADEPENDENTDIR
115115
# Make shared library for custom Hardmax plugin.
116-
(git clone -b release/${TENSORRT_VERSION} https://github.com/NVIDIA/TensorRT.git && \
117-
cd /workspace/TensorRT/samples/python/onnx_custom_plugin && rm -rf build && mkdir build && \
118-
cd build && cmake .. && make -j && cp libcustomHardmaxPlugin.so $PLGDESTDIR/.)
116+
if [ -d "/usr/src/tensorrt" ]; then
117+
cd /usr/src/tensorrt/samples/python/onnx_custom_plugin
118+
else
119+
git clone -b release/${TENSORRT_VERSION} https://github.com/NVIDIA/TensorRT.git
120+
cd /workspace/TensorRT/samples/python/onnx_custom_plugin
121+
fi
122+
rm -rf build && mkdir build && \
123+
cd build && cmake .. && make -j && cp libcustomHardmaxPlugin.so $PLGDESTDIR/.
119124
LD_PRELOAD=$PLGDESTDIR/libcustomHardmaxPlugin.so python3 $SRCDIR/gen_qa_trt_plugin_models.py --models_dir=$PLGDESTDIR
120125
chmod -R 777 $PLGDESTDIR
121126
rsync -av --ignore-existing $BUILD_DIR/$TRITON_VERSION/ /lustre/fsw/core_dlfw_ci/datasets/inferenceserver/${NVIDIA_TRITON_SERVER_VERSION}_${TEST_REPO_ARCH}/

0 commit comments

Comments
 (0)