From e679a9d450f87e72810eff04b77afc3231472180 Mon Sep 17 00:00:00 2001 From: Thomas Parnell Date: Tue, 28 May 2024 12:30:31 +0000 Subject: [PATCH 1/2] Apply temp. patch to Triton code to resolve conflicting cache dirs in TP case. Signed-off-by: Thomas Parnell --- Dockerfile.ubi | 10 ++++++++++ triton_patch/cache_fix.patch | 8 ++++++++ 2 files changed, 18 insertions(+) create mode 100644 triton_patch/cache_fix.patch diff --git a/Dockerfile.ubi b/Dockerfile.ubi index cb92c2ef4..f65b97936 100644 --- a/Dockerfile.ubi +++ b/Dockerfile.ubi @@ -264,6 +264,14 @@ RUN --mount=type=cache,target=/root/.cache/pip \ RUN microdnf install -y gcc \ && microdnf clean all +# patch triton (fix for #720) +COPY triton_patch/cache_fix.patch . +RUN microdnf install -y patch \ + && patch /opt/vllm/lib/python3.11/site-packages/triton/runtime/cache.py cache_fix.patch \ + && microdnf remove -y patch \ + && microdnf clean all \ + && rm cache_fix.patch + ENV HF_HUB_OFFLINE=1 \ PORT=8000 \ GRPC_PORT=8033 \ @@ -281,5 +289,7 @@ RUN microdnf install -y shadow-utils \ COPY LICENSE /licenses/vllm.md +RUN microdnf install -y nano diffutils patch + USER 2000 ENTRYPOINT ["python3", "-m", "vllm.entrypoints.openai.api_server"] diff --git a/triton_patch/cache_fix.patch b/triton_patch/cache_fix.patch new file mode 100644 index 000000000..97a1aa477 --- /dev/null +++ b/triton_patch/cache_fix.patch @@ -0,0 +1,8 @@ +4c4 +< import random +--- +> import uuid +117c117 +< rnd_id = random.randint(0, 1000000) +--- +> rnd_id = str(uuid.uuid4()) From 607f46a748faad278e798c734364e6977ca1b6f4 Mon Sep 17 00:00:00 2001 From: Thomas Parnell Date: Tue, 28 May 2024 12:34:36 +0000 Subject: [PATCH 2/2] Remove dev stuff Signed-off-by: Thomas Parnell --- Dockerfile.ubi | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile.ubi b/Dockerfile.ubi index f65b97936..0ab58963e 100644 --- a/Dockerfile.ubi +++ b/Dockerfile.ubi @@ -289,7 +289,5 @@ RUN microdnf install -y shadow-utils \ COPY LICENSE /licenses/vllm.md -RUN microdnf install -y nano diffutils patch - USER 2000 ENTRYPOINT ["python3", "-m", "vllm.entrypoints.openai.api_server"]