Skip to content

Commit

Permalink
fix: Fix version for setuptools and grpcio-tools. Remove cudnn 8 inst…
Browse files Browse the repository at this point in the history
…allation (#7331)
  • Loading branch information
krishung5 authored Jun 18, 2024
1 parent 190a591 commit f43cedd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1082,9 +1082,9 @@ def create_dockerfile_linux(
"""
if "tensorrtllm" in backends:
df += """
# Remove TRT contents that are not needed in runtime
RUN apt-get update && apt-get install -y libcudnn8-dev && ldconfig
RUN ldconfig
# Remove contents that are not needed in runtime
RUN ARCH="$(uname -i)" \\
&& rm -fr ${TRT_ROOT}/bin ${TRT_ROOT}/targets/${ARCH}-linux-gnu/bin ${TRT_ROOT}/data \\
&& rm -fr ${TRT_ROOT}/doc ${TRT_ROOT}/onnx_graphsurgeon ${TRT_ROOT}/python \\
Expand All @@ -1094,10 +1094,14 @@ def create_dockerfile_linux(
RUN python3 -m pip install --upgrade pip \\
&& pip3 install transformers
# Install TensorRT-LLM
# ldconfig for TRT-LLM
RUN find /usr -name libtensorrt_llm.so -exec dirname {} \; > /etc/ld.so.conf.d/tensorrt-llm.conf
RUN find /opt/tritonserver -name libtritonserver.so -exec dirname {} \; > /etc/ld.so.conf.d/triton-tensorrtllm-worker.conf
# Setuptools has breaking changes in version 70.0.0, so fix it to 69.5.1
# The generated code in grpc_service_pb2_grpc.py depends on grpcio>=1.64.0, so fix it to 1.64.0
RUN pip3 install setuptools==69.5.1 grpcio-tools==1.64.0
ENV LD_LIBRARY_PATH=/usr/local/tensorrt/lib/:/opt/tritonserver/backends/tensorrtllm:$LD_LIBRARY_PATH
"""
with open(os.path.join(ddir, dockerfile_name), "w") as dfile:
Expand Down

0 comments on commit f43cedd

Please sign in to comment.