From be4198e754d43a86115468b64faf0a8833141209 Mon Sep 17 00:00:00 2001 From: biondizzle Date: Sat, 11 Apr 2026 23:19:48 +0000 Subject: [PATCH] Add CMM_BUILD_DATE cache-bust arg to Dockerfile Docker was reusing cached layers for sitecustomize.py and vllm_managed_mem.py COPY steps, causing stale files in the image. CMM_BUILD_DATE arg invalidates the cache for all CMM file copies. --- vllm/Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/vllm/Dockerfile b/vllm/Dockerfile index 7f60fd3..f1746a9 100644 --- a/vllm/Dockerfile +++ b/vllm/Dockerfile @@ -257,14 +257,15 @@ RUN pip uninstall -y pynvml && pip install nvidia-ml-py # - cudaMemPrefetchAsync(GPU): actively migrates pages to GPU immediately, # so model weight writes go to HBM/EGM, not system RAM # -# vllm_managed_mem.py is the launcher that swaps the allocator before any -# CUDA operations and patches vLLM's memory validation to understand the -# larger managed memory space. +# vllm_managed_mem.py is the launcher that patches vLLM's memory validation +# to understand the larger managed memory space. No global allocator swap. # # sitecustomize.py is auto-loaded by Python in ALL subprocesses (including -# vLLM's EngineCore). It applies the allocator swap and torch.cuda patches -# before any CUDA operations in spawned processes. +# vLLM's EngineCore). It sets VLLM_KV_CACHE_USE_MANAGED_MEMORY=1 and patches +# MemorySnapshot/request_memory — does NOT swap the global allocator. # ============================================================================== +ARG CMM_BUILD_DATE=default +RUN echo "CMM build: ${CMM_BUILD_DATE}" > /dev/null COPY managed_alloc.cu /tmp/managed_alloc.cu RUN nvcc -shared -o /usr/local/lib/libmanaged_alloc.so \ /tmp/managed_alloc.cu -Xcompiler -fPIC && rm /tmp/managed_alloc.cu