Skip to content

Commit b204456

Browse files
authored
fix: Set TRTLLM_USE_UCX_KVCACHE by default in container image (#1777)
1 parent 1630f8b commit b204456

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

container/Dockerfile.tensorrt_llm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,13 +329,17 @@ ENV LD_LIBRARY_PATH=/usr/local/nixl/lib/${ARCH_ALT}-linux-gnu:$LD_LIBRARY_PATH
329329

330330
# Use UCX for TRTLLM KV Cache Transfer
331331
ARG TRTLLM_USE_NIXL_KVCACHE_EXPERIMENTAL
332+
ENV TRTLLM_USE_UCX_KVCACHE=1
332333

333-
# Create a script that sets the environment variables and source it
334+
# Create a script that sets the environment variables and source it.
335+
# If TRTLLM_USE_NIXL_KVCACHE_EXPERIMENTAL is set to 1, unset TRTLLM_USE_UCX_KVCACHE
336+
# and set TRTLLM_USE_NIXL_KVCACHE to 1.
334337
RUN echo '#!/bin/bash' > /usr/local/bin/set_trtllm_env.sh && \
335338
if [ "$TRTLLM_USE_NIXL_KVCACHE_EXPERIMENTAL" = "1" ]; then \
339+
echo 'unset TRTLLM_USE_UCX_KVCACHE' >> /usr/local/bin/set_trtllm_env.sh; \
336340
echo 'export TRTLLM_USE_NIXL_KVCACHE=1' >> /usr/local/bin/set_trtllm_env.sh; \
337341
else \
338-
echo 'export TRTLLM_USE_UCX_KVCACHE=1' >> /usr/local/bin/set_trtllm_env.sh; \
342+
echo '# TRTLLM_USE_UCX_KVCACHE should already be set to 1' >> /usr/local/bin/set_trtllm_env.sh; \
339343
fi && \
340344
chmod +x /usr/local/bin/set_trtllm_env.sh
341345

0 commit comments

Comments
 (0)