8
8
echo " h Print this Help."
9
9
echo " t Location of tensorrt library"
10
10
echo " u Option to build unit tests"
11
+ echo " s Triton short tag, e.g. 'r25.06'"
11
12
echo
12
13
}
13
14
14
15
TRT_ROOT=' /usr/local/tensorrt'
15
16
BUILD_UNIT_TESTS=' false'
16
17
17
18
# Get the options
18
- while getopts " :ht:u " option; do
19
+ while getopts " :ht:us: " option; do
19
20
case $option in
20
21
h) # display Help
21
22
Help
@@ -24,6 +25,8 @@ while getopts ":ht:u" option; do
24
25
TRT_ROOT=$OPTARG ;;
25
26
u) # Option to build unit tests
26
27
BUILD_UNIT_TESTS=' true' ;;
28
+ s) # Triton short tag
29
+ TRITON_SHORT_TAG=$OPTARG ;;
27
30
\? ) # Invalid option
28
31
echo " Error: Invalid option"
29
32
echo " "
35
38
echo " Using TRT_ROOT=${TRT_ROOT} "
36
39
echo " Using BUILD_UNIT_TESTS=${BUILD_UNIT_TESTS} "
37
40
41
+ DIRNAME=" $( dirname " $( realpath " $0 " ) " ) "
42
+ if [ -z " $TRITON_SHORT_TAG " ]; then
43
+ # Get TRITON_SHORT_TAG from docker/Dockerfile.multi
44
+ LLM_ROOT=" ${DIRNAME} /../../.."
45
+ TRITON_SHORT_TAG=$( " $LLM_ROOT /jenkins/scripts/get_triton_tag.sh" " $LLM_ROOT " )
46
+ fi
47
+ echo " Using TRITON_SHORT_TAG=${TRITON_SHORT_TAG} "
48
+
38
49
set -x
39
50
apt-get update
40
51
apt-get install -y --no-install-recommends rapidjson-dev
41
52
42
- BUILD_DIR= $( dirname $0 ) /../build
43
- mkdir $BUILD_DIR
44
- BUILD_DIR= $( cd -- " $BUILD_DIR " && pwd )
45
- cd $BUILD_DIR
53
+
54
+ BUILD_DIR= $( realpath " $DIRNAME /../build " )
55
+ mkdir -p " $BUILD_DIR "
56
+ cd " $BUILD_DIR " || exit 1
46
57
47
58
export LD_LIBRARY_PATH=" /usr/local/cuda/compat/lib.real:${LD_LIBRARY_PATH} "
48
59
@@ -51,12 +62,13 @@ if [[ "$BUILD_UNIT_TESTS" == "true" ]]; then
51
62
BUILD_TESTS_ARG=" -DBUILD_TESTS=ON -DUSE_CXX11_ABI=ON"
52
63
fi
53
64
54
- # TODO: Remove specifying Triton version after cmake version is upgraded to 3.31.8
55
- # Get TRITON_SHORT_TAG from docker/Dockerfile.multi
56
- LLM_ROOT=$BUILD_DIR /../../..
57
- LLM_ROOT=$( cd -- " $LLM_ROOT " && pwd)
58
- TRITON_SHORT_TAG=$( " $LLM_ROOT /jenkins/scripts/get_triton_tag.sh" " $LLM_ROOT " )
59
- cmake -DCMAKE_INSTALL_PREFIX:PATH=` pwd` /install ${BUILD_TESTS_ARG} -DTRITON_COMMON_REPO_TAG=${TRITON_SHORT_TAG} -DTRITON_CORE_REPO_TAG=${TRITON_SHORT_TAG} -DTRITON_THIRD_PARTY_REPO_TAG=${TRITON_SHORT_TAG} -DTRITON_BACKEND_REPO_TAG=${TRITON_SHORT_TAG} ..
65
+ cmake -DCMAKE_INSTALL_PREFIX:PATH=" $( pwd) /install" \
66
+ ${BUILD_TESTS_ARG} \
67
+ -DTRITON_COMMON_REPO_TAG=" ${TRITON_SHORT_TAG} " \
68
+ -DTRITON_CORE_REPO_TAG=" ${TRITON_SHORT_TAG} " \
69
+ -DTRITON_THIRD_PARTY_REPO_TAG=" ${TRITON_SHORT_TAG} " \
70
+ -DTRITON_BACKEND_REPO_TAG=" ${TRITON_SHORT_TAG} " \
71
+ ..
60
72
make install
61
73
62
74
mkdir -p /opt/tritonserver/backends/tensorrtllm
0 commit comments