Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 19 additions & 46 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,7 @@ 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
RUN apt update -qq && apt install -y docker.io

# Install tritonclient
COPY --from=sdk /workspace/install/python /tmp/tritonclient
Expand All @@ -62,30 +36,29 @@ 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

RUN python3 -m pip install \
build \
coverage \
mkdocs \
mkdocs-htmlproofer-plugin==0.10.3 \
mypy \
nvidia-pyindex \
types-protobuf \
types-PyYAML \
types-requests \
yapf==0.32.0

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
# 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 apt-get install -y wkhtmltopdf
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}
Expand Down
73 changes: 0 additions & 73 deletions build_wheel.sh

This file was deleted.

76 changes: 75 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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"]
license = "BSD-3-Clause"
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 = [
{name = "NVIDIA Inc.", email = "[email protected]"}
]
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",
"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.dynamic]
version = {file = "VERSION"}

[tool.setuptools.packages.find]
where = ["."]
include = ["model_analyzer*"]
exclude = ["tests*", "examples*", "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
Expand Down
32 changes: 0 additions & 32 deletions requirements.txt

This file was deleted.

121 changes: 0 additions & 121 deletions setup.py

This file was deleted.

Loading