32
32
ARG BASE_IMAGE=nvcr.io/nvidia/tritonserver:24.07-py3-min
33
33
34
34
ARG TRITON_CLIENT_REPO_SUBDIR=clientrepo
35
+ ARG TRITON_PA_REPO_SUBDIR=perfanalyzerrepo
35
36
ARG TRITON_COMMON_REPO_TAG=main
36
37
ARG TRITON_CORE_REPO_TAG=main
38
+ ARG TRITON_CLIENT_REPO_TAG=main
37
39
ARG TRITON_THIRD_PARTY_REPO_TAG=main
38
40
ARG TRITON_MODEL_ANALYZER_REPO_TAG=main
39
41
ARG TRITON_ENABLE_GPU=ON
@@ -103,8 +105,10 @@ RUN rm -f /usr/bin/python && \
103
105
# Build the client library and examples
104
106
ARG TRITON_REPO_ORGANIZATION
105
107
ARG TRITON_CLIENT_REPO_SUBDIR
108
+ ARG TRITON_PA_REPO_SUBDIR
106
109
ARG TRITON_COMMON_REPO_TAG
107
110
ARG TRITON_CORE_REPO_TAG
111
+ ARG TRITON_CLIENT_REPO_TAG
108
112
ARG TRITON_THIRD_PARTY_REPO_TAG
109
113
ARG TRITON_ENABLE_GPU
110
114
ARG JAVA_BINDINGS_MAVEN_VERSION
@@ -114,26 +118,53 @@ ARG TARGETPLATFORM
114
118
WORKDIR /workspace
115
119
COPY TRITON_VERSION .
116
120
COPY ${TRITON_CLIENT_REPO_SUBDIR} client
121
+ COPY ${TRITON_PA_REPO_SUBDIR} perf_analyzer
117
122
118
- WORKDIR /workspace/build
123
+ WORKDIR /workspace/client_build
119
124
RUN cmake -DCMAKE_INSTALL_PREFIX=/workspace/install \
120
125
-DTRITON_VERSION=`cat /workspace/TRITON_VERSION` \
121
126
-DTRITON_REPO_ORGANIZATION=${TRITON_REPO_ORGANIZATION} \
122
127
-DTRITON_COMMON_REPO_TAG=${TRITON_COMMON_REPO_TAG} \
123
128
-DTRITON_CORE_REPO_TAG=${TRITON_CORE_REPO_TAG} \
124
129
-DTRITON_THIRD_PARTY_REPO_TAG=${TRITON_THIRD_PARTY_REPO_TAG} \
130
+ -DTRITON_ENABLE_PERF_ANALYZER=OFF \
125
131
-DTRITON_ENABLE_CC_HTTP=ON -DTRITON_ENABLE_CC_GRPC=ON \
126
- -DTRITON_ENABLE_PYTHON_HTTP=ON -DTRITON_ENABLE_PYTHON_GRPC=ON \
132
+ -DTRITON_ENABLE_PYTHON_HTTP=OFF -DTRITON_ENABLE_PYTHON_GRPC=OFF \
127
133
-DTRITON_ENABLE_JAVA_HTTP=ON \
128
- -DTRITON_ENABLE_PERF_ANALYZER=ON \
134
+ -DTRITON_ENABLE_EXAMPLES=ON -DTRITON_ENABLE_TESTS=ON \
135
+ -DTRITON_ENABLE_GPU=${TRITON_ENABLE_GPU} /workspace/client
136
+ RUN make -j16 cc-clients java-clients && \
137
+ rm -fr ~/.m2
138
+
139
+ # TODO: PA will rebuild the CC clients since it depends on it.
140
+ # This should be optimized so that we do not have to build
141
+ # the CC clients twice. Similarly, because the SDK expectation is
142
+ # that PA is packaged with the python client, we hold off on building
143
+ # the python client until now. Post-migration we should focus
144
+ # effort on de-tangling these flows.
145
+ WORKDIR /workspace/pa_build
146
+ RUN cmake -DCMAKE_INSTALL_PREFIX=/workspace/install \
147
+ -DTRITON_VERSION=`cat /workspace/TRITON_VERSION` \
148
+ -DTRITON_REPO_ORGANIZATION=${TRITON_REPO_ORGANIZATION} \
149
+ -DTRITON_COMMON_REPO_TAG=${TRITON_COMMON_REPO_TAG} \
150
+ -DTRITON_CORE_REPO_TAG=${TRITON_CORE_REPO_TAG} \
151
+ -DTRITON_CLIENT_REPO_TAG=${TRITON_CLIENT_REPO_TAG} \
129
152
-DTRITON_ENABLE_PERF_ANALYZER_C_API=ON \
130
153
-DTRITON_ENABLE_PERF_ANALYZER_TFS=ON \
131
154
-DTRITON_ENABLE_PERF_ANALYZER_TS=ON \
132
155
-DTRITON_ENABLE_PERF_ANALYZER_OPENAI=ON \
133
- -DTRITON_ENABLE_EXAMPLES=ON -DTRITON_ENABLE_TESTS=ON \
134
- -DTRITON_ENABLE_GPU=${TRITON_ENABLE_GPU} /workspace/client
135
- RUN make -j16 cc-clients python-clients java-clients && \
136
- rm -fr ~/.m2
156
+ -DTRITON_ENABLE_CC_HTTP=ON \
157
+ -DTRITON_ENABLE_CC_GRPC=ON \
158
+ -DTRITON_ENABLE_PYTHON_HTTP=ON \
159
+ -DTRITON_ENABLE_PYTHON_GRPC=ON \
160
+ -DTRITON_PACKAGE_PERF_ANALYZER=ON \
161
+ -DTRITON_ENABLE_GPU=${TRITON_ENABLE_GPU} \
162
+ /workspace/perf_analyzer
163
+ RUN make -j16 perf-analyzer python-clients
164
+
165
+ RUN pip3 install build \
166
+ && cd /workspace/perf_analyzer/genai-perf \
167
+ && python3 -m build --wheel --outdir /workspace/install/python
137
168
138
169
# Install Java API Bindings
139
170
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
@@ -144,9 +175,6 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
144
175
--jar-install-path /workspace/install/java-api-bindings; \
145
176
fi
146
177
147
- RUN pip3 install build \
148
- && cd /workspace/client/src/c++/perf_analyzer/genai-perf \
149
- && python3 -m build --wheel --outdir /workspace/install/python
150
178
############################################################################
151
179
## Create sdk container
152
180
############################################################################
0 commit comments