Skip to content

Commit 0ece63f

Browse files
authored
models: Allow generate models using enroot (#8557)
1 parent dcf92e1 commit 0ece63f

1 file changed

Lines changed: 173 additions & 81 deletions

File tree

qa/common/gen_qa_model_repository

Lines changed: 173 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ PYTORCH_IMAGE=${PYTORCH_IMAGE:=nvcr.io/nvidia/pytorch:$TRITON_VERSION-py3}
6969
TENSORRT_IMAGE=${TENSORRT_IMAGE:=nvcr.io/nvidia/tensorrt:$TRITON_VERSION-py3}
7070
CUDA_DEVICE=${NV_GPU:=0}
7171
MODEL_TYPE=${MODEL_TYPE:-""}
72+
TRITON_MODELS_USE_DOCKER=${TRITON_MODELS_USE_DOCKER:-"1"}
73+
TRITON_MODELS_USE_ENROOT=${TRITON_MODELS_USE_ENROOT:-"1"}
7274

7375
log_message.status "define: CI related parameters"
7476
CI_JOB_ID=${CI_JOB_ID:=$(date +%Y%m%d_%H%M)}
@@ -80,50 +82,54 @@ DOCKER_VOLUME=${DOCKER_VOLUME:=volume.gen_qa_model_repository.${CI_JOB_ID}}
8082
DOCKER_VOLUME_CONTAINER=${DOCKER_VOLUME}.gen_qa_model_repository.${CI_JOB_ID}
8183
DOCKER_GPU_ARGS=${DOCKER_GPU_ARGS:-$([[ $RUNNER_GPUS =~ ^[0-9] ]] && eval $NV_DOCKER_ARGS || echo "--gpus device=$CUDA_DEVICE" )}
8284

83-
log_message.status "define: model output directories"
84-
TRITON_MDLS_BLD_DIR=${TRITON_MDLS_BLD_DIR:=/mnt/$CI_JOB_ID}
85-
TRITON_MDLS_SRC_DIR=${TRITON_MDLS_SRC_DIR:=$TRITON_MDLS_BLD_DIR/gen_srcdir}
86-
TRITON_MDLS_QA_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_model_repository
87-
TRITON_MDLS_QA_VARIABLE_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_variable_model_repository
88-
TRITON_MDLS_QA_IDENTITY_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_identity_model_repository
89-
TRITON_MDLS_QA_IDENTITY_BIG_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_identity_big_model_repository
90-
TRITON_MDLS_QA_SHAPETENSOR_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_shapetensor_model_repository
91-
TRITON_MDLS_QA_RESHAPE_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_reshape_model_repository
92-
TRITON_MDLS_QA_SEQUENCE_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_sequence_model_repository
93-
TRITON_MDLS_QA_DYNA_SEQUENCE_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_dyna_sequence_model_repository
94-
TRITON_MDLS_QA_DYNA_SEQUENCE_IMPLICIT_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_dyna_sequence_implicit_model_repository
95-
TRITON_MDLS_QA_VARIABLE_SEQUENCE_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_variable_sequence_model_repository
96-
TRITON_MDLS_QA_ENSEMBLE_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_ensemble_model_repository
97-
TRITON_MDLS_QA_NOSHAPE_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_noshape_model_repository
98-
TRITON_MDLS_QA_TRT_PLUGIN_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_trt_plugin_model_repository
99-
TRITON_MDLS_QA_RAGGED_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_ragged_model_repository
100-
TRITON_MDLS_QA_TRT_FORMAT_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_trt_format_model_repository
101-
TRITON_MDLS_QA_TRT_DATA_DEPENDENT_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_trt_data_dependent_model_repository
102-
TRITON_MDLS_QA_SEQUENCE_IMPLICIT_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_sequence_implicit_model_repository
103-
TRITON_MDLS_QA_VARIABLE_SEQUENCE_IMPLICIT_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_variable_sequence_implicit_model_repository
104-
TRITON_MDLS_QA_SEQUENCE_INITIAL_STATE_IMPLICIT_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_sequence_initial_state_implicit_model_repository
105-
TRITON_MDLS_QA_VARIABLE_SEQUENCE_INITIAL_STATE_IMPLICIT_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_variable_sequence_initial_state_implicit_model_repository
106-
TRITON_MDLS_QA_TORCHTRT_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/torchtrt_model_store
107-
TRITON_MDLS_QA_SCALAR_MODELS=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_scalar_models
108-
TRITON_MDLS_QA_DYNAMIC_BATCH_IMAGE_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_dynamic_batch_image_model_repository
109-
TRITON_MDLS_QA_CUSTOM_OPS=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_custom_ops/libtorch_custom_ops
110-
111-
log_message.status "define: script names"
112-
113-
OPENVINOSCRIPT=gen.OpenVINO.gen_qa_model_repository.v2.sh
114-
log_message.info "OpenVINO script: " "${OPENVINOSCRIPT}"
115-
116-
ONNXSCRIPT=gen.ONNXRuntime.gen_qa_model_repository.v2.sh
117-
log_message.info "ONNX script: " "${ONNXSCRIPT}"
118-
119-
TORCHSCRIPT=gen.PyTorch.gen_qa_model_repository.v2.sh
120-
log_message.info "PyTorch script: " "${TORCHSCRIPT}"
121-
122-
TRTSCRIPT=gen.TensorRT.gen_qa_model_repository.v2.sh
123-
log_message.info "TensorRT script: " "${TRTSCRIPT}"
124-
125-
log_message.status "create: OpenVINO script - ${OPENVINOSCRIPT}"
126-
cat > $OPENVINOSCRIPT <<EOF
85+
function define_model_output_directories() {
86+
log_message.status "define: model output directories"
87+
TRITON_MDLS_BLD_DIR=${TRITON_MDLS_BLD_DIR:=/mnt/$CI_JOB_ID}
88+
TRITON_MDLS_SRC_DIR=${TRITON_MDLS_SRC_DIR:=$TRITON_MDLS_BLD_DIR/gen_srcdir}
89+
TRITON_MDLS_QA_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_model_repository
90+
TRITON_MDLS_QA_VARIABLE_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_variable_model_repository
91+
TRITON_MDLS_QA_IDENTITY_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_identity_model_repository
92+
TRITON_MDLS_QA_IDENTITY_BIG_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_identity_big_model_repository
93+
TRITON_MDLS_QA_SHAPETENSOR_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_shapetensor_model_repository
94+
TRITON_MDLS_QA_RESHAPE_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_reshape_model_repository
95+
TRITON_MDLS_QA_SEQUENCE_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_sequence_model_repository
96+
TRITON_MDLS_QA_DYNA_SEQUENCE_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_dyna_sequence_model_repository
97+
TRITON_MDLS_QA_DYNA_SEQUENCE_IMPLICIT_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_dyna_sequence_implicit_model_repository
98+
TRITON_MDLS_QA_VARIABLE_SEQUENCE_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_variable_sequence_model_repository
99+
TRITON_MDLS_QA_ENSEMBLE_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_ensemble_model_repository
100+
TRITON_MDLS_QA_NOSHAPE_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_noshape_model_repository
101+
TRITON_MDLS_QA_TRT_PLUGIN_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_trt_plugin_model_repository
102+
TRITON_MDLS_QA_RAGGED_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_ragged_model_repository
103+
TRITON_MDLS_QA_TRT_FORMAT_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_trt_format_model_repository
104+
TRITON_MDLS_QA_TRT_DATA_DEPENDENT_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_trt_data_dependent_model_repository
105+
TRITON_MDLS_QA_SEQUENCE_IMPLICIT_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_sequence_implicit_model_repository
106+
TRITON_MDLS_QA_VARIABLE_SEQUENCE_IMPLICIT_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_variable_sequence_implicit_model_repository
107+
TRITON_MDLS_QA_SEQUENCE_INITIAL_STATE_IMPLICIT_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_sequence_initial_state_implicit_model_repository
108+
TRITON_MDLS_QA_VARIABLE_SEQUENCE_INITIAL_STATE_IMPLICIT_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_variable_sequence_initial_state_implicit_model_repository
109+
TRITON_MDLS_QA_TORCHTRT_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/torchtrt_model_store
110+
TRITON_MDLS_QA_SCALAR_MODELS=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_scalar_models
111+
TRITON_MDLS_QA_DYNAMIC_BATCH_IMAGE_MODEL=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_dynamic_batch_image_model_repository
112+
TRITON_MDLS_QA_CUSTOM_OPS=$TRITON_MDLS_BLD_DIR/$TRITON_VERSION/qa_custom_ops/libtorch_custom_ops
113+
}
114+
115+
function define_models_generation_scripts() {
116+
log_message.status "define: script names"
117+
SCRIPT_NAME_SUFFIX=${SCRIPT_NAME_SUFFIX:-v2}
118+
119+
OPENVINOSCRIPT=gen.OpenVINO.gen_qa_model_repository.${SCRIPT_NAME_SUFFIX}.sh
120+
log_message.info "OpenVINO script: " "${OPENVINOSCRIPT}"
121+
122+
ONNXSCRIPT=gen.ONNXRuntime.gen_qa_model_repository.${SCRIPT_NAME_SUFFIX}.sh
123+
log_message.info "ONNX script: " "${ONNXSCRIPT}"
124+
125+
TORCHSCRIPT=gen.PyTorch.gen_qa_model_repository.${SCRIPT_NAME_SUFFIX}.sh
126+
log_message.info "PyTorch script: " "${TORCHSCRIPT}"
127+
128+
TRTSCRIPT=gen.TensorRT.gen_qa_model_repository.${SCRIPT_NAME_SUFFIX}.sh
129+
log_message.info "TensorRT script: " "${TRTSCRIPT}"
130+
131+
log_message.status "create: OpenVINO script - ${OPENVINOSCRIPT}"
132+
cat > $OPENVINOSCRIPT <<EOF
127133
#!/bin/bash
128134
# Make all generated files accessible outside of container
129135
umask 0000
@@ -133,9 +139,18 @@ set -e
133139
set -x
134140
export DEBIAN_FRONTEND=noninteractive
135141
apt-get update && \
136-
apt-get install -y --no-install-recommends build-essential cmake libprotobuf-dev \
137-
protobuf-compiler python3 python3-dev python3-pip wget gnupg2 \
138-
software-properties-common
142+
apt-get install -y --no-install-recommends \
143+
build-essential \
144+
cmake \
145+
libprotobuf-dev \
146+
protobuf-compiler \
147+
python3 \
148+
python3-dev \
149+
python3-pip \
150+
wget \
151+
gnupg2 \
152+
software-properties-common
153+
139154
ln -s /usr/bin/python3 /usr/bin/python
140155
141156
pip3 install "numpy<=1.23.5" setuptools
@@ -157,16 +172,16 @@ chmod -R 777 $TRITON_MDLS_QA_RESHAPE_MODEL
157172
# chmod -R 777 $TRITON_MDLS_QA_DYNA_SEQUENCE_MODEL
158173
EOF
159174

160-
log_message.status "run: chmod a+x ${OPENVINOSCRIPT}"
161-
chmod a+x $OPENVINOSCRIPT
175+
log_message.status "run: chmod a+x ${OPENVINOSCRIPT}"
176+
chmod a+x $OPENVINOSCRIPT
162177

163-
if [ $? -ne 0 ]; then
164-
log_message.error "failed: chmod ${OPENVINOSCRIPT}"
165-
exit 1
166-
fi
178+
if [ $? -ne 0 ]; then
179+
log_message.error "failed: chmod ${OPENVINOSCRIPT}"
180+
exit 1
181+
fi
167182

168-
log_message.status "create: ONNX script - ${ONNXSCRIPT}"
169-
cat > $ONNXSCRIPT <<EOF
183+
log_message.status "create: ONNX script - ${ONNXSCRIPT}"
184+
cat > $ONNXSCRIPT <<EOF
170185
#!/bin/bash
171186
# Make all generated files accessible outside of container
172187
umask 0000
@@ -220,15 +235,15 @@ python3 $TRITON_MDLS_SRC_DIR/gen_qa_sequence_models.py --ensemble --variable --m
220235
chmod -R 777 $TRITON_MDLS_QA_ENSEMBLE_MODEL
221236
EOF
222237

223-
log_message.status "run: chmod a+x ${ONNXSCRIPT}"
224-
chmod a+x ${ONNXSCRIPT}
225-
if [ $? -ne 0 ]; then
226-
log_message.error "failed: chmod ${ONNXSCRIPT}"
227-
exit 1
228-
fi
238+
log_message.status "run: chmod a+x ${ONNXSCRIPT}"
239+
chmod a+x ${ONNXSCRIPT}
240+
if [ $? -ne 0 ]; then
241+
log_message.error "failed: chmod ${ONNXSCRIPT}"
242+
exit 1
243+
fi
229244

230-
log_message.status "create: PyTorch script - ${TORCHSCRIPT}"
231-
cat > $TORCHSCRIPT <<EOF
245+
log_message.status "create: PyTorch script - ${TORCHSCRIPT}"
246+
cat > $TORCHSCRIPT <<EOF
232247
#!/bin/bash
233248
# Make all generated files accessible outside of container
234249
umask 0000
@@ -265,22 +280,23 @@ chmod -R 777 $TRITON_MDLS_QA_RAGGED_MODEL
265280
python3 $TRITON_MDLS_SRC_DIR/gen_qa_image_models.py --resnet50 --resnet152 --vgg19 --models_dir=$TRITON_MDLS_QA_DYNAMIC_BATCH_IMAGE_MODEL
266281
chmod -R 777 $TRITON_MDLS_QA_DYNAMIC_BATCH_IMAGE_MODEL
267282
268-
export TORCH_EXTENSIONS_DIR="/root/.cache/torch_extensions/"
283+
export TORCH_EXTENSIONS_DIR=/tmp/.cache/torch_extensions/
284+
mkdir -p \${TORCH_EXTENSIONS_DIR}
269285
python3 $TRITON_MDLS_SRC_DIR/gen_qa_custom_ops_models.py --libtorch --models_dir=$TRITON_MDLS_QA_CUSTOM_OPS
270286
mkdir -p $TRITON_MDLS_QA_CUSTOM_OPS/libtorch_modulo/
271287
cp \${TORCH_EXTENSIONS_DIR}/custom_modulo/custom_modulo.so $TRITON_MDLS_QA_CUSTOM_OPS/libtorch_modulo/.
272288
chmod -R 777 $TRITON_MDLS_QA_CUSTOM_OPS
273289
EOF
274290

275-
log_message.status "run: chmod a+x ${TORCHSCRIPT}"
276-
chmod a+x ${TORCHSCRIPT}
277-
if [ $? -ne 0 ]; then
278-
log_message.error "failed: chmod ${TORCHSCRIPT}"
279-
exit 1
280-
fi
291+
log_message.status "run: chmod a+x ${TORCHSCRIPT}"
292+
chmod a+x ${TORCHSCRIPT}
293+
if [ $? -ne 0 ]; then
294+
log_message.error "failed: chmod ${TORCHSCRIPT}"
295+
exit 1
296+
fi
281297

282-
log_message.status "create: TensorRT script - ${TRTSCRIPT}"
283-
cat > $TRTSCRIPT <<EOF
298+
log_message.status "create: TensorRT script - ${TRTSCRIPT}"
299+
cat > $TRTSCRIPT <<EOF
284300
#!/bin/bash
285301
# Make all generated files accessible outside of container
286302
umask 0000
@@ -337,17 +353,23 @@ LD_PRELOAD=$TRITON_MDLS_QA_TRT_PLUGIN_MODEL/libcustomHardmaxPlugin.so python3 $T
337353
chmod -R 777 $TRITON_MDLS_QA_TRT_PLUGIN_MODEL
338354
EOF
339355

340-
log_message.status "run: chmod a+x ${TRTSCRIPT}"
341-
chmod a+x ${TRTSCRIPT}
342-
if [ $? -ne 0 ]; then
343-
log_message.error "failed: chmod ${TRTSCRIPT}"
344-
exit 1
345-
fi
356+
log_message.status "run: chmod a+x ${TRTSCRIPT}"
357+
chmod a+x ${TRTSCRIPT}
358+
if [ $? -ne 0 ]; then
359+
log_message.error "failed: chmod ${TRTSCRIPT}"
360+
exit 1
361+
fi
362+
363+
}
346364

347365
log_message.status "check: engine installation"
348-
if which docker ; then
366+
if [ "$TRITON_MODELS_USE_DOCKER" -eq 1 ] && which docker ; then
349367
log_message.info "Docker is installed."
350368

369+
define_model_output_directories
370+
371+
SCRIPT_NAME_SUFFIX=docker.v2 define_models_generation_scripts
372+
351373
if ! docker volume inspect $DOCKER_VOLUME > /dev/null 2>&1; then
352374
log_message.status "docker volume: $DOCKER_VOLUME does not exist. Creating..."
353375
docker volume create $DOCKER_VOLUME --label RUNNER_ID=$RUNNER_ID --label PROJECT_NAME=$PROJECT_NAME
@@ -498,9 +520,79 @@ if which docker ; then
498520
docker volume rm $DOCKER_VOLUME
499521
fi # [ -z $CI ]
500522

501-
elif which enroot ; then
523+
elif [ "$TRITON_MODELS_USE_ENROOT" -eq 1 ] && which enroot ; then
502524
log_message.info "NVIDIA Enroot is installed." ;
525+
526+
TRITON_MDLS_BLD_DIR="/tmp/$CI_JOB_ID" define_model_output_directories
527+
528+
SCRIPT_NAME_SUFFIX=enroot.v1 define_models_generation_scripts
529+
530+
log_message.status "cleanup models folder if exists: $TRITON_MDLS_BLD_DIR"
531+
rm -rf $TRITON_MDLS_BLD_DIR
532+
533+
log_message.status "create models directory structure in: $TRITON_MDLS_BLD_DIR"
534+
mkdir -p \
535+
$TRITON_MDLS_BLD_DIR \
536+
$TRITON_MDLS_SRC_DIR \
537+
$TRITON_MDLS_QA_MODEL \
538+
$TRITON_MDLS_QA_VARIABLE_MODEL \
539+
$TRITON_MDLS_QA_IDENTITY_MODEL \
540+
$TRITON_MDLS_QA_IDENTITY_BIG_MODEL \
541+
$TRITON_MDLS_QA_SHAPETENSOR_MODEL \
542+
$TRITON_MDLS_QA_RESHAPE_MODEL \
543+
$TRITON_MDLS_QA_SEQUENCE_MODEL \
544+
$TRITON_MDLS_QA_DYNA_SEQUENCE_MODEL \
545+
$TRITON_MDLS_QA_DYNA_SEQUENCE_IMPLICIT_MODEL \
546+
$TRITON_MDLS_QA_VARIABLE_SEQUENCE_MODEL \
547+
$TRITON_MDLS_QA_ENSEMBLE_MODEL \
548+
$TRITON_MDLS_QA_NOSHAPE_MODEL \
549+
$TRITON_MDLS_QA_TRT_PLUGIN_MODEL \
550+
$TRITON_MDLS_QA_RAGGED_MODEL \
551+
$TRITON_MDLS_QA_TRT_FORMAT_MODEL \
552+
$TRITON_MDLS_QA_TRT_DATA_DEPENDENT_MODEL \
553+
$TRITON_MDLS_QA_SEQUENCE_IMPLICIT_MODEL \
554+
$TRITON_MDLS_QA_VARIABLE_SEQUENCE_IMPLICIT_MODEL \
555+
$TRITON_MDLS_QA_SEQUENCE_INITIAL_STATE_IMPLICIT_MODEL \
556+
$TRITON_MDLS_QA_VARIABLE_SEQUENCE_INITIAL_STATE_IMPLICIT_MODEL \
557+
$TRITON_MDLS_QA_TORCHTRT_MODEL \
558+
$TRITON_MDLS_QA_SCALAR_MODELS \
559+
$TRITON_MDLS_QA_DYNAMIC_BATCH_IMAGE_MODEL
560+
561+
log_message.status "copy scripts to: $TRITON_MDLS_SRC_DIR"
562+
cp -rv $TRITON_MDLS_BASE_SCRIPT_DIR/* $TRITON_MDLS_SRC_DIR/
563+
564+
log_message.status "enroot import: $UBUNTU_IMAGE to ubuntu.$CI_JOB_ID.enroot.sqsh"
565+
enroot import --output /tmp/ubuntu.$CI_JOB_ID.enroot.sqsh docker://$UBUNTU_IMAGE
566+
567+
568+
log_message.status "enroot create: openvino.ubuntu.$CI_JOB_ID"
569+
enroot create --name openvino.ubuntu.$CI_JOB_ID /tmp/ubuntu.$CI_JOB_ID.enroot.sqsh
570+
log_message.info "enroot start: openvino.ubuntu.$CI_JOB_ID"
571+
enroot start --root --rw -m /tmp:/tmp openvino.ubuntu.$CI_JOB_ID bash -xe $TRITON_MDLS_SRC_DIR/$OPENVINOSCRIPT
572+
573+
574+
log_message.status "enroot create: onnxruntime.ubuntu.$CI_JOB_ID"
575+
enroot create --name onnxruntime.ubuntu.$CI_JOB_ID /tmp/ubuntu.$CI_JOB_ID.enroot.sqsh
576+
log_message.info "enroot start: onnxruntime.ubuntu.$CI_JOB_ID"
577+
enroot start --root --rw -m /tmp:/tmp onnxruntime.ubuntu.$CI_JOB_ID bash -xe $TRITON_MDLS_SRC_DIR/$ONNXSCRIPT
578+
579+
580+
log_message.status "enroot import: $PYTORCH_IMAGE to /tmp/pytorch.$CI_JOB_ID.enroot.sqsh"
581+
enroot import --output /tmp/pytorch.$CI_JOB_ID.enroot.sqsh docker://$PYTORCH_IMAGE
582+
583+
log_message.status "enroot create: pytorch.$CI_JOB_ID"
584+
enroot create --name pytorch.$CI_JOB_ID /tmp/pytorch.$CI_JOB_ID.enroot.sqsh
585+
log_message.status "enroot start: pytorch.$CI_JOB_ID"
586+
enroot start --rw -m /tmp:/tmp pytorch.$CI_JOB_ID bash -xe $TRITON_MDLS_SRC_DIR/$TORCHSCRIPT
587+
588+
log_message.status "enroot import: $TENSORRT_IMAGE to /tmp/tensorrt.$CI_JOB_ID.enroot.sqsh"
589+
enroot import --output /tmp/tensorrt.$CI_JOB_ID.enroot.sqsh docker://$TENSORRT_IMAGE
590+
log_message.status "enroot create: tensorrt.$CI_JOB_ID"
591+
enroot create --name tensorrt.$CI_JOB_ID /tmp/tensorrt.$CI_JOB_ID.enroot.sqsh
592+
log_message.status "enroot start: tensorrt.$CI_JOB_ID"
593+
enroot start --rw -m /tmp:/tmp tensorrt.$CI_JOB_ID bash -xe $TRITON_MDLS_SRC_DIR/$TRTSCRIPT
594+
503595
else
504596
log_message.warning "Neither Docker nor NVIDIA Enroot is installed." ;
505-
log_message.warning "Please install either Docker or NVIDIA Enroot to generate the models." ;
597+
log_message.warning "Please install Docker or NVIDIA Enroot to generate the models." ;
506598
fi

0 commit comments

Comments
 (0)