From 36f0b5f268f75e461d39a016ac2420b7402dd0e3 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Thu, 30 Oct 2025 14:06:26 -0700 Subject: [PATCH 01/15] Testing... --- Dockerfile | 42 +++++------------------------------------- 1 file changed, 5 insertions(+), 37 deletions(-) diff --git a/Dockerfile b/Dockerfile index fea1cd97..bff2ac20 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -ARG BASE_IMAGE=nvcr.io/nvidia/tritonserver:25.10-py3 -ARG TRITONSDK_BASE_IMAGE=nvcr.io/nvidia/tritonserver:25.10-py3-sdk +ARG BASE_IMAGE=nvcr.io/nvidia/tritonserver:25.09-py3 +ARG TRITONSDK_BASE_IMAGE=nvcr.io/nvidia/tritonserver:25.09-py3-sdk ARG MODEL_ANALYZER_VERSION=1.48.0dev ARG MODEL_ANALYZER_CONTAINER_VERSION=25.11dev @@ -28,33 +28,6 @@ ARG TRITONSDK_BASE_IMAGE # Ensure apt-get won't prompt for selecting options ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && \ - apt-get install -y python3-dev - -RUN mkdir -p /opt/triton-model-analyzer - -# Install architecture-specific components - -# Install DCGM version 4.x. Steps from https://developer.nvidia.com/dcgm#Downloads -# Remove any old DCGM installations -RUN dpkg --list datacenter-gpu-manager &> /dev/null && \ - apt purge --yes datacenter-gpu-manager || true && \ - dpkg --list datacenter-gpu-manager-config &> /dev/null && \ - apt purge --yes datacenter-gpu-manager-config || true - -RUN apt-get update && \ - apt-get install --yes \ - --install-recommends \ - datacenter-gpu-manager-4-cuda13 - -# Install Docker -RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc && \ - echo \ - "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ - $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ - tee /etc/apt/sources.list.d/docker.list > /dev/null && \ - apt-get update && apt-get install -y docker-ce-cli - # Install tritonclient COPY --from=sdk /workspace/install/python /tmp/tritonclient RUN find /tmp/tritonclient -maxdepth 1 -type f -name \ @@ -62,17 +35,12 @@ RUN find /tmp/tritonclient -maxdepth 1 -type f -name \ xargs pip3 install --upgrade && rm -rf /tmp/tritonclient/ WORKDIR /opt/triton-model-analyzer -RUN rm -fr * -COPY --from=sdk /usr/local/bin/perf_analyzer . -RUN chmod +x ./perf_analyzer COPY . . RUN chmod +x /opt/triton-model-analyzer/nvidia_entrypoint.sh -RUN chmod +x build_wheel.sh && \ - ./build_wheel.sh perf_analyzer true && \ - rm -f perf_analyzer + RUN python3 -m pip install nvidia-pyindex && \ - python3 -m pip install wheels/triton_model_analyzer-*-manylinux*.whl + python3 -m pip install . # Install other pip packages RUN python3 -m pip install coverage RUN python3 -m pip install mypy @@ -83,7 +51,7 @@ RUN python3 -m pip install mkdocs RUN python3 -m pip install mkdocs-htmlproofer-plugin==0.10.3 RUN python3 -m pip install yapf==0.32.0 -RUN apt-get install -y wkhtmltopdf +RUN apt-get update -qq && apt-get install -y wkhtmltopdf ENTRYPOINT ["/opt/triton-model-analyzer/nvidia_entrypoint.sh"] ENV MODEL_ANALYZER_VERSION=${MODEL_ANALYZER_VERSION} From 9fc7de5eb89f862fda2430982e197747d58f0593 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Thu, 30 Oct 2025 15:21:25 -0700 Subject: [PATCH 02/15] Remove unused package --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index bff2ac20..bd9f3f61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,8 +51,6 @@ RUN python3 -m pip install mkdocs RUN python3 -m pip install mkdocs-htmlproofer-plugin==0.10.3 RUN python3 -m pip install yapf==0.32.0 -RUN apt-get update -qq && apt-get install -y wkhtmltopdf - ENTRYPOINT ["/opt/triton-model-analyzer/nvidia_entrypoint.sh"] ENV MODEL_ANALYZER_VERSION=${MODEL_ANALYZER_VERSION} ENV MODEL_ANALYZER_CONTAINER_VERSION=${MODEL_ANALYZER_CONTAINER_VERSION} From afc965b42dff7ab6e7f813d9475a50ffa576fdba Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Thu, 30 Oct 2025 15:59:19 -0700 Subject: [PATCH 03/15] restucture file --- Dockerfile | 24 +++++++++++++----------- setup.py | 1 + 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index bd9f3f61..26702db7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,17 +39,19 @@ WORKDIR /opt/triton-model-analyzer COPY . . RUN chmod +x /opt/triton-model-analyzer/nvidia_entrypoint.sh -RUN python3 -m pip install nvidia-pyindex && \ - python3 -m pip install . -# Install other pip packages -RUN python3 -m pip install coverage -RUN python3 -m pip install mypy -RUN python3 -m pip install types-PyYAML -RUN python3 -m pip install types-requests -RUN python3 -m pip install types-protobuf -RUN python3 -m pip install mkdocs -RUN python3 -m pip install mkdocs-htmlproofer-plugin==0.10.3 -RUN python3 -m pip install yapf==0.32.0 +RUN python3 setup.py bdist_wheel \ + && python3 -m pip install ./dist/triton_model_analyzer*.whl + +RUN python3 -m pip install \ + nvidia-pyindex \ + coverage \ + mypy \ + types-PyYAML \ + types-requests \ + types-protobuf \ + mkdocs \ + mkdocs-htmlproofer-plugin==0.10.3 \ + yapf==0.32.0 ENTRYPOINT ["/opt/triton-model-analyzer/nvidia_entrypoint.sh"] ENV MODEL_ANALYZER_VERSION=${MODEL_ANALYZER_VERSION} diff --git a/setup.py b/setup.py index 0fd1e06c..54013fe7 100755 --- a/setup.py +++ b/setup.py @@ -106,6 +106,7 @@ def get_tag(self): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Environment :: Console", "Natural Language :: English", "Operating System :: POSIX :: Linux", From 46f8454e27c7c4cf55a3cad6d2df8941f1aae879 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Thu, 30 Oct 2025 16:52:04 -0700 Subject: [PATCH 04/15] Sort lines ascending --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 26702db7..af03cf06 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,14 +43,15 @@ RUN python3 setup.py bdist_wheel \ && python3 -m pip install ./dist/triton_model_analyzer*.whl RUN python3 -m pip install \ - nvidia-pyindex \ coverage \ + docker \ + mkdocs \ + mkdocs-htmlproofer-plugin==0.10.3 \ mypy \ + nvidia-pyindex \ + types-protobuf \ types-PyYAML \ types-requests \ - types-protobuf \ - mkdocs \ - mkdocs-htmlproofer-plugin==0.10.3 \ yapf==0.32.0 ENTRYPOINT ["/opt/triton-model-analyzer/nvidia_entrypoint.sh"] From a2d977507f0bc0ac33eeb5d79ad215eccc0d5f55 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Thu, 30 Oct 2025 16:53:20 -0700 Subject: [PATCH 05/15] Update Dockerfile base images --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index af03cf06..0dfec683 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -ARG BASE_IMAGE=nvcr.io/nvidia/tritonserver:25.09-py3 -ARG TRITONSDK_BASE_IMAGE=nvcr.io/nvidia/tritonserver:25.09-py3-sdk +ARG BASE_IMAGE=nvcr.io/nvidia/tritonserver:25.10-py3 +ARG TRITONSDK_BASE_IMAGE=nvcr.io/nvidia/tritonserver:25.10-py3-sdk ARG MODEL_ANALYZER_VERSION=1.48.0dev ARG MODEL_ANALYZER_CONTAINER_VERSION=25.11dev From 16139204d2ae63fdf2efaa0f5bf636a2c043404c Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Thu, 30 Oct 2025 17:01:36 -0700 Subject: [PATCH 06/15] Preserver docker installation --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0dfec683..9bf36f33 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,7 +44,6 @@ RUN python3 setup.py bdist_wheel \ RUN python3 -m pip install \ coverage \ - docker \ mkdocs \ mkdocs-htmlproofer-plugin==0.10.3 \ mypy \ @@ -54,6 +53,8 @@ RUN python3 -m pip install \ types-requests \ yapf==0.32.0 +RUN apt update -qq && apt install -y docker.io docker-buildx-plugin + ENTRYPOINT ["/opt/triton-model-analyzer/nvidia_entrypoint.sh"] ENV MODEL_ANALYZER_VERSION=${MODEL_ANALYZER_VERSION} ENV MODEL_ANALYZER_CONTAINER_VERSION=${MODEL_ANALYZER_CONTAINER_VERSION} From e35671a1b13a38579b5f0935e112bc4b7947eb69 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Thu, 30 Oct 2025 18:08:35 -0700 Subject: [PATCH 07/15] remove plugin installation --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9bf36f33..41868023 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,7 +53,7 @@ RUN python3 -m pip install \ types-requests \ yapf==0.32.0 -RUN apt update -qq && apt install -y docker.io docker-buildx-plugin +RUN apt update -qq && apt install -y docker.io ENTRYPOINT ["/opt/triton-model-analyzer/nvidia_entrypoint.sh"] ENV MODEL_ANALYZER_VERSION=${MODEL_ANALYZER_VERSION} From b151f838996b2c23be43f0d33c633335b77ce6aa Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Thu, 30 Oct 2025 21:08:27 -0700 Subject: [PATCH 08/15] Update dockerfile --- Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 41868023..8b685546 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,7 @@ ARG TRITONSDK_BASE_IMAGE # Ensure apt-get won't prompt for selecting options ENV DEBIAN_FRONTEND=noninteractive +RUN apt update -qq && apt install -y docker.io # Install tritonclient COPY --from=sdk /workspace/install/python /tmp/tritonclient @@ -39,9 +40,6 @@ WORKDIR /opt/triton-model-analyzer COPY . . RUN chmod +x /opt/triton-model-analyzer/nvidia_entrypoint.sh -RUN python3 setup.py bdist_wheel \ - && python3 -m pip install ./dist/triton_model_analyzer*.whl - RUN python3 -m pip install \ coverage \ mkdocs \ @@ -53,8 +51,9 @@ RUN python3 -m pip install \ types-requests \ yapf==0.32.0 -RUN apt update -qq && apt install -y docker.io - +RUN python3 setup.py bdist_wheel \ + && cd dist \ + && python3 -m pip install triton*model*analyzer*.whl ENTRYPOINT ["/opt/triton-model-analyzer/nvidia_entrypoint.sh"] ENV MODEL_ANALYZER_VERSION=${MODEL_ANALYZER_VERSION} ENV MODEL_ANALYZER_CONTAINER_VERSION=${MODEL_ANALYZER_CONTAINER_VERSION} From 79ff6240e30aff64a2869affd088d35f1955e78a Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Fri, 31 Oct 2025 07:43:13 -0700 Subject: [PATCH 09/15] Refactor project --- Dockerfile | 12 +++-- build_wheel.sh | 73 ---------------------------- pyproject.toml | 74 ++++++++++++++++++++++++++++ requirements.txt | 32 ------------- setup.py | 122 ----------------------------------------------- 5 files changed, 82 insertions(+), 231 deletions(-) delete mode 100755 build_wheel.sh delete mode 100644 requirements.txt delete mode 100755 setup.py diff --git a/Dockerfile b/Dockerfile index 8b685546..37cf6b01 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,10 +37,8 @@ RUN find /tmp/tritonclient -maxdepth 1 -type f -name \ WORKDIR /opt/triton-model-analyzer -COPY . . -RUN chmod +x /opt/triton-model-analyzer/nvidia_entrypoint.sh - RUN python3 -m pip install \ + build \ coverage \ mkdocs \ mkdocs-htmlproofer-plugin==0.10.3 \ @@ -51,10 +49,16 @@ RUN python3 -m pip install \ types-requests \ yapf==0.32.0 -RUN python3 setup.py bdist_wheel \ +COPY . . + +RUN python3 -m build --wheel \ && cd dist \ && python3 -m pip install triton*model*analyzer*.whl + +RUN chmod +x /opt/triton-model-analyzer/nvidia_entrypoint.sh + ENTRYPOINT ["/opt/triton-model-analyzer/nvidia_entrypoint.sh"] + ENV MODEL_ANALYZER_VERSION=${MODEL_ANALYZER_VERSION} ENV MODEL_ANALYZER_CONTAINER_VERSION=${MODEL_ANALYZER_CONTAINER_VERSION} ENV TRITON_SERVER_SDK_CONTAINER_IMAGE_NAME=${TRITONSDK_BASE_IMAGE} diff --git a/build_wheel.sh b/build_wheel.sh deleted file mode 100755 index 29f35127..00000000 --- a/build_wheel.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash -# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -PYTHON=${PYTHON:=`which python3`} - -if [[ "$1" == "-h" || "$1" == "--help" ]] ; then - echo "usage: $0 " - exit 1 -fi - -if [[ ! -f "VERSION" ]]; then - echo "Could not find VERSION" - exit 1 -fi - -if [[ ! -f "LICENSE" ]]; then - echo "Could not find LICENSE" - exit 1 -fi - -if [[ -z "$1" ]]; then - echo "Path to perf_analyzer binary not provided. Checking PATH..." - if [[ -z "$(which perf_analyzer)" ]]; then - echo "Could not find perf_analyzer binary" - exit 1 - else - PERF_ANALYZER_PATH="$(which perf_analyzer)" - fi -elif [[ ! -f "$1" ]]; then - echo "Could not find perf_analyzer binary" - exit 1 -else - PERF_ANALYZER_PATH="${1}" -fi - -WHLDIR="`pwd`/wheels" -mkdir -p ${WHLDIR} - -# Copy required files into WHEELDIR temporarily -cp $PERF_ANALYZER_PATH "${WHLDIR}" -cp VERSION "${WHLDIR}" -cp LICENSE "${WHLDIR}" -cp requirements.txt "${WHLDIR}" - -# Set platform and build wheel -echo $(date) : "=== Building wheel" -if [[ -z "$2" || "$2" = true ]]; then - PLATFORM=`uname -m` - if [ "$PLATFORM" = "aarch64" ] ; then - PLATFORM_NAME="manylinux2014_aarch64" - else - PLATFORM_NAME="manylinux1_x86_64" - fi - ${PYTHON} setup.py bdist_wheel --plat-name $PLATFORM_NAME --dependency-dir $WHLDIR -else - ${PYTHON} setup.py bdist_wheel --dependency-dir $WHLDIR -fi -rm -f $WHLDIR/* && cp dist/* $WHLDIR -rm -rf build dist triton_model_analyzer.egg-info -touch ${WHLDIR}/stamp.whl -echo $(date) : "=== Output wheel file is in: ${WHLDIR}" diff --git a/pyproject.toml b/pyproject.toml index d7131f32..aee4e1bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,6 +12,80 @@ # See the License for the specific language governing permissions and # limitations under the License. +[build-system] +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "triton-model-analyzer" +dynamic = ["version"] +description = "Triton Model Analyzer is a tool to profile and analyze the runtime performance of one or more models on the Triton Inference Server" +readme = {content-type = "text/markdown", text = """See the Model Analyzer's [installation documentation](https://github.com/triton-inference-server/model_analyzer/blob/main/docs/install.md#using-pip3) for package details. The [quick start](https://github.com/triton-inference-server/model_analyzer/blob/main/docs/quick_start.md) documentation describes how to get started with profiling and analysis using Triton Model Analyzer."""} +license = {text = "BSD"} +authors = [ + {name = "NVIDIA Inc.", email = "sw-dl-triton@nvidia.com"} +] +keywords = ["triton", "tensorrt", "inference", "server", "service", "analyzer", "nvidia"] +classifiers = [ + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "Intended Audience :: Information Technology", + "Topic :: Scientific/Engineering", + "Topic :: Scientific/Engineering :: Image Recognition", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Software Development :: Libraries", + "Topic :: Utilities", + "License :: OSI Approved :: BSD License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Environment :: Console", + "Natural Language :: English", + "Operating System :: POSIX :: Linux", +] +requires-python = ">=3.8" +dependencies = [ + "cryptography>=3.3.2", + "distro>=1.5.0", + "docker>=4.3.1", + "gevent>=22.08.0", + "grpcio>=1.63.0,<1.68", + "httplib2>=0.19.0", + "importlib_metadata>=7.1.0", + "matplotlib>=3.3.4", + "numba>=0.51.2", + "optuna==3.6.1", + "pdfkit>=0.6.1", + "prometheus_client>=0.9.0", + "protobuf", + "psutil>=5.8.0", + "pyyaml>=5.3.1", + "requests>=2.24.0", + "tritonclient[all]>=2.4.0", + "urllib3>=2.0.7", +] + +[project.urls] +Homepage = "https://developer.nvidia.com/nvidia-triton-inference-server" +Repository = "https://github.com/triton-inference-server/model_analyzer" + +[project.scripts] +model-analyzer = "model_analyzer.entrypoint:main" + + +[project.optional-dependencies] +perf-analyzer = ["perf-analyzer"] + +[tool.setuptools] +packages = {find = {exclude = ["tests"]}} +zip-safe = false + +[tool.setuptools.dynamic] +version = {file = "VERSION"} + [tool.codespell] # note: pre-commit passes explicit lists of files here, which this skip file list doesn't override - # this is only to allow you to run codespell interactively diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 0e6e70f4..00000000 --- a/requirements.txt +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2020-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -cryptography>=3.3.2 -distro>=1.5.0 -docker>=4.3.1 -gevent>=22.08.0 -grpcio>=1.63.0,<1.68 -httplib2>=0.19.0 -importlib_metadata>=7.1.0 -matplotlib>=3.3.4 -numba>=0.51.2 -optuna==3.6.1 -pdfkit>=0.6.1 -prometheus_client>=0.9.0 -protobuf -psutil>=5.8.0 -pyyaml>=5.3.1 -requests>=2.24.0 -tritonclient[all]>=2.4.0 -urllib3>=2.0.7 diff --git a/setup.py b/setup.py deleted file mode 100755 index 54013fe7..00000000 --- a/setup.py +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright 2020-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import os -import sys - -from setuptools import find_packages, setup - -if "--dependency-dir" in sys.argv: - idx = sys.argv.index("--dependency-dir") - DEPENDENCY_DIR = sys.argv[idx + 1] - sys.argv.pop(idx + 1) - sys.argv.pop(idx) -else: - DEPENDENCY_DIR = "." - -if "--plat-name" in sys.argv: - PLATFORM_FLAG = sys.argv[sys.argv.index("--plat-name") + 1] -else: - PLATFORM_FLAG = "any" - - -def version(filename="VERSION"): - with open(os.path.join(filename)) as f: - project_version = f.read() - return project_version - - -def req_file(filename): - with open(os.path.join(filename)) as f: - content = f.readlines() - return [x.strip() for x in content if not x.startswith("#")] - - -project_version = version() -install_requires = req_file("requirements.txt") - -try: - from wheel.bdist_wheel import bdist_wheel as _bdist_wheel - - class bdist_wheel(_bdist_wheel): - def finalize_options(self): - _bdist_wheel.finalize_options(self) - self.root_is_pure = False - - def get_tag(self): - pyver, abi, plat = "py3", "none", PLATFORM_FLAG - return pyver, abi, plat - -except ImportError: - bdist_wheel = None - -data_files = [ - ("", [os.path.join(DEPENDENCY_DIR, "LICENSE")]), -] - -if PLATFORM_FLAG != "any": - data_files += [("bin", [os.path.join(DEPENDENCY_DIR, "perf_analyzer")])] - -setup( - name="triton-model-analyzer", - version=project_version, - author="NVIDIA Inc.", - author_email="sw-dl-triton@nvidia.com", - description="Triton Model Analyzer is a tool to profile and analyze the runtime performance of one or more models on the Triton Inference Server", - long_description="""See the Model Analyzer's [installation documentation](https://github.com/triton-inference-server/model_analyzer/blob/main/docs/install.md#using-pip3) """ - """for package details. The [quick start](https://github.com/triton-inference-server/model_analyzer/blob/main/docs/quick_start.md) documentation """ - """describes how to get started with profiling and analysis using Triton Model Analyzer.""", - long_description_content_type="text/markdown", - license="BSD", - url="https://developer.nvidia.com/nvidia-triton-inference-server", - keywords=[ - "triton", - "tensorrt", - "inference", - "server", - "service", - "analyzer", - "nvidia", - ], - classifiers=[ - "Intended Audience :: Developers", - "Intended Audience :: Science/Research", - "Intended Audience :: Information Technology", - "Topic :: Scientific/Engineering", - "Topic :: Scientific/Engineering :: Image Recognition", - "Topic :: Scientific/Engineering :: Artificial Intelligence", - "Topic :: Software Development :: Libraries", - "Topic :: Utilities", - "License :: OSI Approved :: BSD License", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Environment :: Console", - "Natural Language :: English", - "Operating System :: POSIX :: Linux", - ], - entry_points={ - "console_scripts": ["model-analyzer = model_analyzer.entrypoint:main"] - }, - install_requires=install_requires, - dependency_links=["https://pypi.ngc.nvidia.com/tritonclient"], - packages=find_packages(exclude=("tests",)), - zip_safe=False, - data_files=data_files, -) From 36be1e3c82403190e91d2b35f98f0401da8b62c8 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Fri, 31 Oct 2025 13:35:20 -0700 Subject: [PATCH 10/15] Comment some progress --- pyproject.toml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index aee4e1bb..fd3fd5f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,15 +13,16 @@ # limitations under the License. [build-system] -requires = ["setuptools>=61.0", "wheel"] +requires = ["setuptools >= 61.0","wheel"] build-backend = "setuptools.build_meta" [project] name = "triton-model-analyzer" dynamic = ["version"] +license = "BSD-3-Clause" +license-files = ["LICENSE"] description = "Triton Model Analyzer is a tool to profile and analyze the runtime performance of one or more models on the Triton Inference Server" readme = {content-type = "text/markdown", text = """See the Model Analyzer's [installation documentation](https://github.com/triton-inference-server/model_analyzer/blob/main/docs/install.md#using-pip3) for package details. The [quick start](https://github.com/triton-inference-server/model_analyzer/blob/main/docs/quick_start.md) documentation describes how to get started with profiling and analysis using Triton Model Analyzer."""} -license = {text = "BSD"} authors = [ {name = "NVIDIA Inc.", email = "sw-dl-triton@nvidia.com"} ] @@ -35,7 +36,6 @@ classifiers = [ "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Software Development :: Libraries", "Topic :: Utilities", - "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", @@ -79,9 +79,10 @@ model-analyzer = "model_analyzer.entrypoint:main" [project.optional-dependencies] perf-analyzer = ["perf-analyzer"] -[tool.setuptools] -packages = {find = {exclude = ["tests"]}} -zip-safe = false +[tool.setuptools.packages.find] +where = ["."] +exclude = ["tests", "examples", "qa"] +namespaces = false [tool.setuptools.dynamic] version = {file = "VERSION"} From 5faf0e779d37b2289afbce2aa061b0401bc17e62 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Fri, 31 Oct 2025 14:28:29 -0700 Subject: [PATCH 11/15] Update pyproject.toml --- pyproject.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fd3fd5f6..459d1884 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,14 +79,14 @@ model-analyzer = "model_analyzer.entrypoint:main" [project.optional-dependencies] perf-analyzer = ["perf-analyzer"] -[tool.setuptools.packages.find] -where = ["."] -exclude = ["tests", "examples", "qa"] -namespaces = false - [tool.setuptools.dynamic] version = {file = "VERSION"} +[tool.setuptools.packages.find] +where = ["."] +include = ["model_analyzer*","tests*"] +# exclude = ["qa"] + [tool.codespell] # note: pre-commit passes explicit lists of files here, which this skip file list doesn't override - # this is only to allow you to run codespell interactively From d601c9fdcf026b904eb1ee579d8e2c85fcf6e8d8 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Fri, 31 Oct 2025 14:59:22 -0700 Subject: [PATCH 12/15] Update build scenario --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 459d1884..4ab0fbb1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,8 +84,8 @@ version = {file = "VERSION"} [tool.setuptools.packages.find] where = ["."] -include = ["model_analyzer*","tests*"] -# exclude = ["qa"] +include = ["model_analyzer*"] +exclude = ["model_analyzer/tests*"] [tool.codespell] # note: pre-commit passes explicit lists of files here, which this skip file list doesn't override - From 2302e3a08e1e8bb173f949e06037f180bd5053db Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Fri, 31 Oct 2025 15:29:39 -0700 Subject: [PATCH 13/15] update patterns --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4ab0fbb1..5be9d8fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,7 +85,7 @@ version = {file = "VERSION"} [tool.setuptools.packages.find] where = ["."] include = ["model_analyzer*"] -exclude = ["model_analyzer/tests*"] +exclude = ["tests*", "examples*", "qa*"] [tool.codespell] # note: pre-commit passes explicit lists of files here, which this skip file list doesn't override - From 980178f42611b1eac7c54404ccedad0492fb036f Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Fri, 31 Oct 2025 15:41:20 -0700 Subject: [PATCH 14/15] Remove default file location --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5be9d8fb..6c0e318a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,6 @@ build-backend = "setuptools.build_meta" name = "triton-model-analyzer" dynamic = ["version"] license = "BSD-3-Clause" -license-files = ["LICENSE"] description = "Triton Model Analyzer is a tool to profile and analyze the runtime performance of one or more models on the Triton Inference Server" readme = {content-type = "text/markdown", text = """See the Model Analyzer's [installation documentation](https://github.com/triton-inference-server/model_analyzer/blob/main/docs/install.md#using-pip3) for package details. The [quick start](https://github.com/triton-inference-server/model_analyzer/blob/main/docs/quick_start.md) documentation describes how to get started with profiling and analysis using Triton Model Analyzer."""} authors = [ From 7724a6a213a6440806d9ad77cbd185bcdf7bd8d8 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Fri, 31 Oct 2025 15:42:58 -0700 Subject: [PATCH 15/15] Update copyrights --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6c0e318a..7a63072b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,4 @@ -# Copyright 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright 2023-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.