Skip to content

Commit 199fb03

Browse files
authored
Uninstall setuptools after TRTLLM build (#7465)
1 parent 4b41015 commit 199fb03

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

build.py

100755100644
+12-11
Original file line numberDiff line numberDiff line change
@@ -1086,17 +1086,18 @@ def create_dockerfile_linux(
10861086
# Remove contents that are not needed in runtime
10871087
# Setuptools has breaking changes in version 70.0.0, so fix it to 69.5.1
10881088
# The generated code in grpc_service_pb2_grpc.py depends on grpcio>=1.64.0, so fix it to 1.64.0
1089-
RUN ldconfig && \\
1090-
ARCH="$(uname -i)" && \\
1091-
rm -fr ${TRT_ROOT}/bin ${TRT_ROOT}/targets/${ARCH}-linux-gnu/bin ${TRT_ROOT}/data && \\
1092-
rm -fr ${TRT_ROOT}/doc ${TRT_ROOT}/onnx_graphsurgeon ${TRT_ROOT}/python && \\
1093-
rm -fr ${TRT_ROOT}/samples ${TRT_ROOT}/targets/${ARCH}-linux-gnu/samples && \\
1094-
python3 -m pip install --upgrade pip && \\
1095-
pip3 install --no-cache-dir transformers && \\
1096-
find /usr -name libtensorrt_llm.so -exec dirname {} \; > /etc/ld.so.conf.d/tensorrt-llm.conf && \\
1097-
find /opt/tritonserver -name libtritonserver.so -exec dirname {} \; > /etc/ld.so.conf.d/triton-tensorrtllm-worker.conf && \\
1098-
pip3 install --no-cache-dir setuptools==69.5.1 grpcio-tools==1.64.0
1099-
1089+
1090+
RUN ldconfig && \
1091+
ARCH="$(uname -i)" && \
1092+
rm -fr ${TRT_ROOT}/bin ${TRT_ROOT}/targets/${ARCH}-linux-gnu/bin ${TRT_ROOT}/data && \
1093+
rm -fr ${TRT_ROOT}/doc ${TRT_ROOT}/onnx_graphsurgeon ${TRT_ROOT}/python && \
1094+
rm -fr ${TRT_ROOT}/samples ${TRT_ROOT}/targets/${ARCH}-linux-gnu/samples && \
1095+
python3 -m pip install --upgrade pip && \
1096+
pip3 install --no-cache-dir transformers && \
1097+
find /usr -name libtensorrt_llm.so -exec dirname {} \; > /etc/ld.so.conf.d/tensorrt-llm.conf && \
1098+
find /opt/tritonserver -name libtritonserver.so -exec dirname {} \; > /etc/ld.so.conf.d/triton-tensorrtllm-worker.conf && \
1099+
pip3 install --no-cache-dir grpcio-tools==1.64.0 && \
1100+
pip3 uninstall -y setuptools
11001101
ENV LD_LIBRARY_PATH=/usr/local/tensorrt/lib/:/opt/tritonserver/backends/tensorrtllm:$LD_LIBRARY_PATH
11011102
11021103
# There are some ucc issues when spawning mpi processes with ompi v4.1.7a1.

0 commit comments

Comments
 (0)