Skip to content

Commit 285a7b0

Browse files
committed
add kvbm flag
1 parent 1333cab commit 285a7b0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

container/Dockerfile.trtllm

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
ARG BASE_IMAGE="nvcr.io/nvidia/pytorch"
55
ARG BASE_IMAGE_TAG="25.06-py3"
66
ARG RELEASE_BUILD
7+
ARG ENABLE_KVBM=false
78
ARG RUNTIME_IMAGE="nvcr.io/nvidia/cuda"
89
ARG RUNTIME_IMAGE_TAG="12.9.1-runtime-ubuntu24.04"
910

@@ -240,6 +241,8 @@ ARG ARCH_ALT
240241

241242
FROM quay.io/pypa/manylinux_2_28_${ARCH_ALT} AS wheel_builder
242243
ARG RELEASE_BUILD
244+
# Use arg ENABLE_KVBM = true to turn on the block-manager feature
245+
ARG ENABLE_KVBM
243246
ARG CARGO_BUILD_JOBS
244247
# Set CARGO_BUILD_JOBS to 16 if not provided
245248
# This is to prevent cargo from building $(nproc) jobs in parallel,
@@ -292,7 +295,11 @@ RUN cargo build \
292295
# Build dynamo wheels
293296
RUN uv build --wheel --out-dir /workspace/dist && \
294297
cd /workspace/lib/bindings/python && \
295-
uv build --wheel --out-dir /workspace/dist --python 3.12 && \
298+
if [ "$ENABLE_KVBM" = "true" ]; then \
299+
maturin build --release --features block-manager --out /workspace/dist; \
300+
else \
301+
maturin build --release --out /workspace/dist; \
302+
fi && \
296303
if [ "$RELEASE_BUILD" = "true" ]; then \
297304
uv build --wheel --out-dir /workspace/dist --python 3.11 && \
298305
uv build --wheel --out-dir /workspace/dist --python 3.10; \

0 commit comments

Comments
 (0)