Unverified Commit c42b1a9a authored by Tanmay Verma's avatar Tanmay Verma Committed by GitHub
Browse files

build: Suffix dev version to trtllm wheel (#1057)

parent 1fa431c0
...@@ -89,6 +89,7 @@ TENSORRTLLM_PIP_WHEEL_DIR="/tmp/trtllm_wheel/" ...@@ -89,6 +89,7 @@ TENSORRTLLM_PIP_WHEEL_DIR="/tmp/trtllm_wheel/"
# Important Note: This commit is not used in our CI pipeline. See the CI # Important Note: This commit is not used in our CI pipeline. See the CI
# variables to learn how to run a pipeline with a specific commit. # variables to learn how to run a pipeline with a specific commit.
TRTLLM_COMMIT=83f37614ef735d251281136c3c05b1fecf8ef68b TRTLLM_COMMIT=83f37614ef735d251281136c3c05b1fecf8ef68b
# TensorRT-LLM PyPI index URL # TensorRT-LLM PyPI index URL
TENSORRTLLM_INDEX_URL="https://pypi.python.org/simple" TENSORRTLLM_INDEX_URL="https://pypi.python.org/simple"
TENSORRTLLM_PIP_WHEEL="" TENSORRTLLM_PIP_WHEEL=""
......
...@@ -55,7 +55,31 @@ git checkout $TRTLLM_COMMIT ...@@ -55,7 +55,31 @@ git checkout $TRTLLM_COMMIT
git submodule update --init --recursive git submodule update --init --recursive
git lfs pull git lfs pull
# Build the TRT-LLM base image. VERSION_FILE="tensorrt_llm/version.py"
# Check if file exists
if [ ! -f "$VERSION_FILE" ]; then
echo "Error: $VERSION_FILE not found"
exit 1
fi
# Create a backup of the original version file
cp $VERSION_FILE ${VERSION_FILE}.bak
# Check if version line exists
if ! grep -q "^__version__" "$VERSION_FILE"; then
echo "Error: __version__ not found in $VERSION_FILE"
exit 1
fi
# Append suffix to version
COMMIT_VERSION=$(git rev-parse --short HEAD)
sed -i "s/__version__ = \"\(.*\)\"/__version__ = \"\1+dev${COMMIT_VERSION}\"/" "$VERSION_FILE"
echo "Updated version:"
grep "__version__" "$VERSION_FILE"
make -C docker wheel_build make -C docker wheel_build
# Copy the wheel to the host # Copy the wheel to the host
...@@ -65,6 +89,10 @@ docker create --name trtllm_wheel_container docker.io/tensorrt_llm/wheel:latest ...@@ -65,6 +89,10 @@ docker create --name trtllm_wheel_container docker.io/tensorrt_llm/wheel:latest
docker cp trtllm_wheel_container:/src/tensorrt_llm/build $OUTPUT_DIR/ docker cp trtllm_wheel_container:/src/tensorrt_llm/build $OUTPUT_DIR/
cp $OUTPUT_DIR/build/*.whl $OUTPUT_DIR/ cp $OUTPUT_DIR/build/*.whl $OUTPUT_DIR/
docker rm trtllm_wheel_container || true docker rm trtllm_wheel_container || true
# Restore the original version file
mv ${VERSION_FILE}.bak $VERSION_FILE
) )
# Store the commit hash in the output directory to ensure the wheel is built from the correct commit. # Store the commit hash in the output directory to ensure the wheel is built from the correct commit.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment