@@ -144,7 +144,7 @@ RUN if [ "$HAS_TRTLLM_CONTEXT" = "1" ]; then \
144144 fi; \
145145 else \
146146 # Download and run install_tensorrt.sh from TensorRT-LLM GitHub before installing the wheel
147- TRTLLM_VERSION=$(echo "${TENSORRTLLM_PIP_WHEEL}" | sed -n 's/.*==\ ([0-9a-zA-Z\.\-]*\ ).*/\1/p ') && \
147+ TRTLLM_VERSION=$(echo "${TENSORRTLLM_PIP_WHEEL}" | sed -E 's/.*==([0-9a-zA-Z.+-]+ ).*/\1/') && \
148148 (curl -fsSL --retry 5 --retry-delay 10 --max-time 1800 -o /tmp/install_tensorrt.sh "https://github.com/NVIDIA/TensorRT-LLM/raw/v${TRTLLM_VERSION}/docker/common/install_tensorrt.sh" || \
149149 curl -fsSL --retry 5 --retry-delay 10 --max-time 1800 -o /tmp/install_tensorrt.sh "https://github.com/NVIDIA/TensorRT-LLM/raw/${GITHUB_TRTLLM_COMMIT}/docker/common/install_tensorrt.sh") && \
150150 # Modify the script to use virtual environment pip instead of system pip3
@@ -153,8 +153,14 @@ RUN if [ "$HAS_TRTLLM_CONTEXT" = "1" ]; then \
153153 # Install TensorRT-LLM wheel from the provided index URL, allow dependencies from PyPI
154154 # TRTLLM 1.2.0rc2 has issues installing from pypi with uv, installing from direct wheel link works best
155155 # explicitly installing triton 3.5.0 as trtllm only lists triton as dependency on x64_64 for some reason
156- export TENSORRTLLM_PIP_WHEEL="https://pypi.nvidia.com/tensorrt-llm/tensorrt_llm-1.2.0rc2-cp312-cp312-linux_${ARCH_ALT}.whl"; \
157- uv pip install --no-cache --index-strategy=unsafe-best-match --extra-index-url "${TENSORRTLLM_INDEX_URL}" "${TENSORRTLLM_PIP_WHEEL}" triton==3.5.0; \
156+ if echo "${TENSORRTLLM_PIP_WHEEL}" | grep -q '^tensorrt-llm=='; then \
157+ TRTLLM_VERSION=$(echo "${TENSORRTLLM_PIP_WHEEL}" | sed -E 's/tensorrt-llm==([0-9a-zA-Z.+-]+).*/\1/'); \
158+ PYTHON_TAG="cp$(echo ${PYTHON_VERSION} | tr -d '.')"; \
159+ DIRECT_URL="https://pypi.nvidia.com/tensorrt-llm/tensorrt_llm-${TRTLLM_VERSION}-${PYTHON_TAG}-${PYTHON_TAG}-linux_${ARCH_ALT}.whl"; \
160+ uv pip install --no-cache --index-strategy=unsafe-best-match --extra-index-url "${TENSORRTLLM_INDEX_URL}" "${DIRECT_URL}" triton==3.5.0; \
161+ else \
162+ uv pip install --no-cache --index-strategy=unsafe-best-match --extra-index-url "${TENSORRTLLM_INDEX_URL}" "${TENSORRTLLM_PIP_WHEEL}" triton==3.5.0; \
163+ fi; \
158164 fi
159165
160166##################################################
0 commit comments