Skip to content

Commit b0558c7

Browse files
dbarijoyang-nv
authored andcommitted
[None][fix] Fix build of tritonbuild/tritonrelease image (#7003)
Signed-off-by: Dimitrios Bariamis <[email protected]> Co-authored-by: Dimitrios Bariamis <[email protected]> Signed-off-by: Wangshanshan <[email protected]>
1 parent 44cc308 commit b0558c7

File tree

3 files changed

+25
-12
lines changed

3 files changed

+25
-12
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ examples/**/.git
99
examples/**/*.bin
1010
examples/**/*.engine
1111
examples/**/*.onnx
12+
examples/**/*.safetensors
1213
examples/**/c-model
1314
examples/models/core/gpt/gpt*

docker/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ CODE_DIR ?= /code/tensorrt_llm
137137
EXTRA_VOLUMES ?=
138138
CCACHE_DIR ?= $(CODE_DIR)/cpp/.ccache
139139
CONAN_DIR ?= $(CODE_DIR)/cpp/.conan
140-
USER_CACHE_DIR ?= $(HOME_DIR)/.cache
140+
USER_CACHE_DIR ?= $(shell readlink -f "${HOME_DIR}/.cache")
141141
RUN_CMD ?=
142142
CONTAINER_NAME ?= tensorrt_llm
143143
WORK_DIR ?= $(CODE_DIR)

triton_backend/inflight_batcher_llm/scripts/build.sh

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ Help()
88
echo "h Print this Help."
99
echo "t Location of tensorrt library"
1010
echo "u Option to build unit tests"
11+
echo "s Triton short tag, e.g. 'r25.06'"
1112
echo
1213
}
1314

1415
TRT_ROOT='/usr/local/tensorrt'
1516
BUILD_UNIT_TESTS='false'
1617

1718
# Get the options
18-
while getopts ":ht:u" option; do
19+
while getopts ":ht:us:" option; do
1920
case $option in
2021
h) # display Help
2122
Help
@@ -24,6 +25,8 @@ while getopts ":ht:u" option; do
2425
TRT_ROOT=$OPTARG;;
2526
u) # Option to build unit tests
2627
BUILD_UNIT_TESTS='true';;
28+
s) # Triton short tag
29+
TRITON_SHORT_TAG=$OPTARG;;
2730
\?) # Invalid option
2831
echo "Error: Invalid option"
2932
echo ""
@@ -35,14 +38,22 @@ done
3538
echo "Using TRT_ROOT=${TRT_ROOT}"
3639
echo "Using BUILD_UNIT_TESTS=${BUILD_UNIT_TESTS}"
3740

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+
3849
set -x
3950
apt-get update
4051
apt-get install -y --no-install-recommends rapidjson-dev
4152

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
4657

4758
export LD_LIBRARY_PATH="/usr/local/cuda/compat/lib.real:${LD_LIBRARY_PATH}"
4859

@@ -51,12 +62,13 @@ if [[ "$BUILD_UNIT_TESTS" == "true" ]]; then
5162
BUILD_TESTS_ARG="-DBUILD_TESTS=ON -DUSE_CXX11_ABI=ON"
5263
fi
5364

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+
..
6072
make install
6173

6274
mkdir -p /opt/tritonserver/backends/tensorrtllm

0 commit comments

Comments
 (0)