From 409475a827795000301f0d27582befab0563888b Mon Sep 17 00:00:00 2001 From: Yuan Tang Date: Tue, 24 Dec 2024 11:53:28 -0500 Subject: [PATCH] [Bugfix] Fix issues in CPU build Dockerfile. Fixes #9182 (#11435) Signed-off-by: Yuan Tang --- Dockerfile.cpu | 6 +++--- setup.py | 10 +++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Dockerfile.cpu b/Dockerfile.cpu index ebe226cf6d148..f163edc27cba8 100644 --- a/Dockerfile.cpu +++ b/Dockerfile.cpu @@ -26,10 +26,10 @@ RUN pip install intel_extension_for_pytorch==2.5.0 WORKDIR /workspace +COPY requirements-build.txt requirements-build.txt ARG PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" ENV PIP_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL} RUN --mount=type=cache,target=/root/.cache/pip \ - --mount=type=bind,src=requirements-build.txt,target=requirements-build.txt \ pip install --upgrade pip && \ pip install -r requirements-build.txt @@ -37,9 +37,9 @@ FROM cpu-test-1 AS build WORKDIR /workspace/vllm +COPY requirements-common.txt requirements-common.txt +COPY requirements-cpu.txt requirements-cpu.txt RUN --mount=type=cache,target=/root/.cache/pip \ - --mount=type=bind,src=requirements-common.txt,target=requirements-common.txt \ - --mount=type=bind,src=requirements-cpu.txt,target=requirements-cpu.txt \ pip install -v -r requirements-cpu.txt COPY . . diff --git a/setup.py b/setup.py index 73407b64edf22..61d2d710aa20e 100644 --- a/setup.py +++ b/setup.py @@ -455,9 +455,13 @@ def get_gaudi_sw_version(): def get_vllm_version() -> str: - version = get_version( - write_to="vllm/_version.py", # TODO: move this to pyproject.toml - ) + # TODO: Revisit this temporary approach: https://github.com/vllm-project/vllm/issues/9182#issuecomment-2404860236 + try: + version = get_version( + write_to="vllm/_version.py", # TODO: move this to pyproject.toml + ) + except LookupError: + version = "0.0.0" sep = "+" if "+" not in version else "." # dev versions might contain +