|
32 | 32 | import os.path |
33 | 33 | import pathlib |
34 | 34 | import platform |
| 35 | +import re |
35 | 36 | import stat |
36 | 37 | import subprocess |
37 | 38 | import sys |
|
75 | 76 | "triton_container_version": "26.07dev", |
76 | 77 | "upstream_container_version": "26.05", |
77 | 78 | "ort_version": "1.24.4", |
78 | | - "ort_openvino_version": "2026.1.0", |
79 | | - "standalone_openvino_version": "2026.1.0", |
| 79 | + "ort_openvino_version": "2026.2.0", |
| 80 | + "standalone_openvino_version": "2026.2.0", |
80 | 81 | "dcgm_version": "4.5.3-1", |
81 | 82 | "rhel_py_version": "3.12.3", |
82 | 83 | } |
@@ -921,6 +922,7 @@ def create_dockerfile_buildbase_rhel(ddir, dockerfile_name, argmap): |
921 | 922 |
|
922 | 923 | RUN pip3 install --upgrade pip \\ |
923 | 924 | && pip3 install --upgrade \\ |
| 925 | + auditwheel \\ |
924 | 926 | build \\ |
925 | 927 | wheel \\ |
926 | 928 | setuptools \\ |
@@ -1034,6 +1036,7 @@ def create_dockerfile_buildbase(ddir, dockerfile_name, argmap): |
1034 | 1036 | && rm -rf /var/lib/apt/lists/* |
1035 | 1037 |
|
1036 | 1038 | RUN pip3 install --upgrade \\ |
| 1039 | + auditwheel \\ |
1037 | 1040 | build \\ |
1038 | 1041 | docker \\ |
1039 | 1042 | virtualenv \\ |
@@ -1171,10 +1174,21 @@ def create_dockerfile_linux( |
1171 | 1174 |
|
1172 | 1175 | WORKDIR /opt/tritonserver |
1173 | 1176 | COPY NVIDIA_Deep_Learning_Container_License.pdf . |
1174 | | -RUN find /opt/tritonserver/python -maxdepth 1 -type f -name \\ |
1175 | | - "tritonserver-*.whl" | xargs -I {{}} pip install --upgrade {{}}[{FLAGS.triton_wheels_dependencies_group}] && \\ |
1176 | | - find /opt/tritonserver/python -maxdepth 1 -type f -name \\ |
1177 | | - "tritonfrontend-*.whl" | xargs -I {{}} pip install --upgrade {{}}[{FLAGS.triton_wheels_dependencies_group}] |
| 1177 | +# TRI-1118 — fail fast if either tritonserver or tritonfrontend wheel is |
| 1178 | +# missing from /opt/tritonserver/python. The legacy `find | xargs -I` is |
| 1179 | +# a silent no-op when find returns zero matches: xargs runs the command |
| 1180 | +# zero times and the layer succeeds, masking the gap until something |
| 1181 | +# downstream (a wheel publish job, or pip install tritonfrontend) |
| 1182 | +# discovers nothing was actually installed. Check existence first. |
| 1183 | +RUN set -e; \\ |
| 1184 | + for pkg in tritonserver tritonfrontend; do \\ |
| 1185 | + wheels=$(find /opt/tritonserver/python -maxdepth 1 -type f -name "${{pkg}}-*.whl"); \\ |
| 1186 | + if [ -z "$wheels" ]; then \\ |
| 1187 | + echo "ERROR: ${{pkg}}-*.whl missing from /opt/tritonserver/python -- build did not stage the wheel into the image" >&2; \\ |
| 1188 | + exit 1; \\ |
| 1189 | + fi; \\ |
| 1190 | + printf '%s\\n' "$wheels" | xargs -I {{}} pip install --upgrade "{{}}[{FLAGS.triton_wheels_dependencies_group}]"; \\ |
| 1191 | + done |
1178 | 1192 |
|
1179 | 1193 | RUN pip3 install -r python/openai/requirements.txt |
1180 | 1194 |
|
@@ -1301,6 +1315,7 @@ def dockerfile_prepare_container_linux(argmap, backends, enable_gpu, target_mach |
1301 | 1315 | libgoogle-perftools-dev \\ |
1302 | 1316 | libjemalloc-dev \\ |
1303 | 1317 | libnuma-dev \\ |
| 1318 | + libssl-dev \\ |
1304 | 1319 | wget \\ |
1305 | 1320 | {backend_dependencies} \\ |
1306 | 1321 | python3-pip \\ |
@@ -1664,6 +1679,25 @@ def create_docker_build_script(script_name, container_install_dir, container_ci_ |
1664 | 1679 | ), |
1665 | 1680 | ] |
1666 | 1681 |
|
| 1682 | + # TRI-1118 — propagate TRITON_RELEASE_VERSION into the wheel build |
| 1683 | + # only when it was actually set in main() (release-semantic version |
| 1684 | + # or explicit --release-version). Dev / pre-release builds leave it |
| 1685 | + # unset so build_wheel.py reads the in-tree TRITON_VERSION file and |
| 1686 | + # takes the PEP 817 variant path. |
| 1687 | + if "TRITON_RELEASE_VERSION" in os.environ: |
| 1688 | + runargs += [ |
| 1689 | + "-e", |
| 1690 | + f"TRITON_RELEASE_VERSION={os.environ['TRITON_RELEASE_VERSION']}", |
| 1691 | + ] |
| 1692 | + # TRI-1118 — forward PEP 427 build-tag and PEP 817 nv-part inputs so |
| 1693 | + # build_wheel.py inside the buildbase container can emit pipeline-correct |
| 1694 | + # wheel filenames. CUDA_VERSION is deliberately NOT forwarded -- the |
| 1695 | + # container's own CUDA base image defines it; host CUDA may differ |
| 1696 | + # (see core/python/build_wheel.py:_detect_cuda_version). |
| 1697 | + for var in ("CI_PIPELINE_ID", "NVIDIA_UPSTREAM_VERSION", "NVIDIA_BUILD_ID"): |
| 1698 | + if os.environ.get(var): |
| 1699 | + runargs += ["-e", f"{var}={os.environ[var]}"] |
| 1700 | + |
1667 | 1701 | runargs += ["tritonserver_buildbase"] |
1668 | 1702 |
|
1669 | 1703 | runargs += ["./cmake_build"] |
@@ -1787,6 +1821,18 @@ def core_build( |
1787 | 1821 | # [FIXME] Placing the tritonserver and tritonfrontend wheel files in 'python' for now, |
1788 | 1822 | # should be uploaded to pip registry to be able to install directly |
1789 | 1823 | cmake_script.mkdir(os.path.join(install_dir, "python")) |
| 1824 | + # TRI-1118 — tritonfrontend wheel is built by the triton-server |
| 1825 | + # sub-build's `frontend-server-wheel` target, but its CMake |
| 1826 | + # `install(DIRECTORY ${WHEEL_OUT_DIR})` rule doesn't traverse the |
| 1827 | + # outer install pass, so the wheel never lands in |
| 1828 | + # repo_install_dir/python/ alongside the core's tritonserver wheel. |
| 1829 | + # Pull it in from the build tree directly so the subsequent |
| 1830 | + # `triton*.whl` glob picks it up. Safe no-op when the wheel is |
| 1831 | + # absent (e.g. downstream builds that disable the frontend). |
| 1832 | + cmake_script.cmd( |
| 1833 | + f"find {repo_build_dir} -path '*/wheel/dist/tritonfrontend-*.whl' " |
| 1834 | + f"-exec cp {{}} {os.path.join(repo_install_dir, 'python')}/ \\;" |
| 1835 | + ) |
1790 | 1836 | cmake_script.cp( |
1791 | 1837 | os.path.join(repo_install_dir, "python", "triton*.whl"), |
1792 | 1838 | os.path.join(install_dir, "python"), |
@@ -2466,8 +2512,12 @@ def enable_all(): |
2466 | 2512 | parser.add_argument( |
2467 | 2513 | "--release-version", |
2468 | 2514 | required=False, |
2469 | | - default=DEFAULT_TRITON_VERSION_MAP["release_version"], |
2470 | | - help="This flag sets the release version for Triton Inference Server to be built. Default: the latest released version.", |
| 2515 | + default=None, |
| 2516 | + help="Override the wheel base version (TRI-1118). When set, exported " |
| 2517 | + "as TRITON_RELEASE_VERSION so build_wheel.py uses it as the bare " |
| 2518 | + "PEP 440 version. When unset, build.py falls back to --version when " |
| 2519 | + "it matches X.Y.Z release-semantic, otherwise leaves the env var " |
| 2520 | + "unset and lets the in-tree TRITON_VERSION file rule (PEP 817 path).", |
2471 | 2521 | ) |
2472 | 2522 | parser.add_argument( |
2473 | 2523 | "--triton-container-version", |
@@ -2596,6 +2646,22 @@ def enable_all(): |
2596 | 2646 | if FLAGS.version is None: |
2597 | 2647 | FLAGS.version = DEFAULT_TRITON_VERSION_MAP["release_version"] |
2598 | 2648 |
|
| 2649 | + # TRI-1118 — choose whether to export TRITON_RELEASE_VERSION based on |
| 2650 | + # the resolved Triton version: |
| 2651 | + # - --release-version explicitly passed -> use it (override) |
| 2652 | + # - FLAGS.version matches X.Y.Z -> propagate FLAGS.version |
| 2653 | + # - anything else (dev / pre-release / etc) -> leave unset so the |
| 2654 | + # wheel build reads the |
| 2655 | + # in-tree TRITON_VERSION |
| 2656 | + # file (PEP 817 variant). |
| 2657 | + # The container build forwards this env var via `docker run -e` |
| 2658 | + # (create_docker_build_script). For --no-container-build, the |
| 2659 | + # cmake_build subprocess inherits the host env directly. |
| 2660 | + if FLAGS.release_version is not None: |
| 2661 | + os.environ.setdefault("TRITON_RELEASE_VERSION", FLAGS.release_version) |
| 2662 | + elif re.match(r"^\d+\.\d+\.\d+$", FLAGS.version): |
| 2663 | + os.environ.setdefault("TRITON_RELEASE_VERSION", FLAGS.version) |
| 2664 | + |
2599 | 2665 | if FLAGS.build_parallel is None: |
2600 | 2666 | FLAGS.build_parallel = multiprocessing.cpu_count() * 2 |
2601 | 2667 |
|
|
0 commit comments