mirror of
https://github.com/NVIDIA/TensorRT-LLM.git
synced 2026-01-13 22:18:36 +08:00
[None][fix] Fix build of tritonbuild/tritonrelease image (#7003)
Signed-off-by: Dimitrios Bariamis <12195802+dbari@users.noreply.github.com> Co-authored-by: Dimitrios Bariamis <12195802+dbari@users.noreply.github.com>
This commit is contained in:
parent
3efe1d918a
commit
a343e8535e
@ -9,5 +9,6 @@ examples/**/.git
|
||||
examples/**/*.bin
|
||||
examples/**/*.engine
|
||||
examples/**/*.onnx
|
||||
examples/**/*.safetensors
|
||||
examples/**/c-model
|
||||
examples/models/core/gpt/gpt*
|
||||
|
||||
@ -176,9 +176,7 @@ FROM wheel AS tritonbuild
|
||||
WORKDIR /src/tensorrt_llm
|
||||
RUN pip install /src/tensorrt_llm/build/tensorrt_llm*.whl
|
||||
COPY ./triton_backend/ ./triton_backend/
|
||||
COPY ./jenkins/scripts/get_triton_tag.sh ./jenkins/scripts/get_triton_tag.sh
|
||||
COPY ./docker/Dockerfile.multi ./docker/Dockerfile.multi
|
||||
RUN bash ./triton_backend/inflight_batcher_llm/scripts/build.sh
|
||||
RUN bash ./triton_backend/inflight_batcher_llm/scripts/build.sh -s "r${TRITON_BASE_TAG%-py3}"
|
||||
|
||||
|
||||
FROM release AS tritonrelease
|
||||
|
||||
@ -137,7 +137,7 @@ CODE_DIR ?= /code/tensorrt_llm
|
||||
EXTRA_VOLUMES ?=
|
||||
CCACHE_DIR ?= $(CODE_DIR)/cpp/.ccache
|
||||
CONAN_DIR ?= $(CODE_DIR)/cpp/.conan
|
||||
USER_CACHE_DIR ?= $(HOME_DIR)/.cache
|
||||
USER_CACHE_DIR ?= $(shell readlink -f "${HOME_DIR}/.cache")
|
||||
RUN_CMD ?=
|
||||
CONTAINER_NAME ?= tensorrt_llm
|
||||
WORK_DIR ?= $(CODE_DIR)
|
||||
|
||||
@ -8,6 +8,7 @@ Help()
|
||||
echo "h Print this Help."
|
||||
echo "t Location of tensorrt library"
|
||||
echo "u Option to build unit tests"
|
||||
echo "s Triton short tag, e.g. 'r25.06'"
|
||||
echo
|
||||
}
|
||||
|
||||
@ -15,7 +16,7 @@ TRT_ROOT='/usr/local/tensorrt'
|
||||
BUILD_UNIT_TESTS='false'
|
||||
|
||||
# Get the options
|
||||
while getopts ":ht:u" option; do
|
||||
while getopts ":ht:us:" option; do
|
||||
case $option in
|
||||
h) # display Help
|
||||
Help
|
||||
@ -24,6 +25,8 @@ while getopts ":ht:u" option; do
|
||||
TRT_ROOT=$OPTARG;;
|
||||
u) # Option to build unit tests
|
||||
BUILD_UNIT_TESTS='true';;
|
||||
s) # Triton short tag
|
||||
TRITON_SHORT_TAG=$OPTARG;;
|
||||
\?) # Invalid option
|
||||
echo "Error: Invalid option"
|
||||
echo ""
|
||||
@ -35,14 +38,22 @@ done
|
||||
echo "Using TRT_ROOT=${TRT_ROOT}"
|
||||
echo "Using BUILD_UNIT_TESTS=${BUILD_UNIT_TESTS}"
|
||||
|
||||
DIRNAME="$(dirname "$(realpath "$0")")"
|
||||
if [ -z "$TRITON_SHORT_TAG" ]; then
|
||||
# Get TRITON_SHORT_TAG from docker/Dockerfile.multi
|
||||
LLM_ROOT="${DIRNAME}/../../.."
|
||||
TRITON_SHORT_TAG=$("$LLM_ROOT/jenkins/scripts/get_triton_tag.sh" "$LLM_ROOT")
|
||||
fi
|
||||
echo "Using TRITON_SHORT_TAG=${TRITON_SHORT_TAG}"
|
||||
|
||||
set -x
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends rapidjson-dev
|
||||
|
||||
BUILD_DIR=$(dirname $0)/../build
|
||||
mkdir $BUILD_DIR
|
||||
BUILD_DIR=$(cd -- "$BUILD_DIR" && pwd)
|
||||
cd $BUILD_DIR
|
||||
|
||||
BUILD_DIR=$(realpath "$DIRNAME/../build")
|
||||
mkdir -p "$BUILD_DIR"
|
||||
cd "$BUILD_DIR" || exit 1
|
||||
|
||||
export LD_LIBRARY_PATH="/usr/local/cuda/compat/lib.real:${LD_LIBRARY_PATH}"
|
||||
|
||||
@ -51,12 +62,13 @@ if [[ "$BUILD_UNIT_TESTS" == "true" ]]; then
|
||||
BUILD_TESTS_ARG="-DBUILD_TESTS=ON -DUSE_CXX11_ABI=ON"
|
||||
fi
|
||||
|
||||
# TODO: Remove specifying Triton version after cmake version is upgraded to 3.31.8
|
||||
# Get TRITON_SHORT_TAG from docker/Dockerfile.multi
|
||||
LLM_ROOT=$BUILD_DIR/../../..
|
||||
LLM_ROOT=$(cd -- "$LLM_ROOT" && pwd)
|
||||
TRITON_SHORT_TAG=$("$LLM_ROOT/jenkins/scripts/get_triton_tag.sh" "$LLM_ROOT")
|
||||
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} ..
|
||||
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}" \
|
||||
..
|
||||
make install
|
||||
|
||||
mkdir -p /opt/tritonserver/backends/tensorrtllm
|
||||
|
||||
Loading…
Reference in New Issue
Block a user