Skip to content

Commit 409475a

Browse files
[Bugfix] Fix issues in CPU build Dockerfile. Fixes vllm-project#9182 (vllm-project#11435)
Signed-off-by: Yuan Tang <[email protected]>
1 parent 196c34b commit 409475a

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Dockerfile.cpu

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ RUN pip install intel_extension_for_pytorch==2.5.0
2626

2727
WORKDIR /workspace
2828

29+
COPY requirements-build.txt requirements-build.txt
2930
ARG PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu"
3031
ENV PIP_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL}
3132
RUN --mount=type=cache,target=/root/.cache/pip \
32-
--mount=type=bind,src=requirements-build.txt,target=requirements-build.txt \
3333
pip install --upgrade pip && \
3434
pip install -r requirements-build.txt
3535

3636
FROM cpu-test-1 AS build
3737

3838
WORKDIR /workspace/vllm
3939

40+
COPY requirements-common.txt requirements-common.txt
41+
COPY requirements-cpu.txt requirements-cpu.txt
4042
RUN --mount=type=cache,target=/root/.cache/pip \
41-
--mount=type=bind,src=requirements-common.txt,target=requirements-common.txt \
42-
--mount=type=bind,src=requirements-cpu.txt,target=requirements-cpu.txt \
4343
pip install -v -r requirements-cpu.txt
4444

4545
COPY . .

setup.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -455,9 +455,13 @@ def get_gaudi_sw_version():
455455

456456

457457
def get_vllm_version() -> str:
458-
version = get_version(
459-
write_to="vllm/_version.py", # TODO: move this to pyproject.toml
460-
)
458+
# TODO: Revisit this temporary approach: https://github.com/vllm-project/vllm/issues/9182#issuecomment-2404860236
459+
try:
460+
version = get_version(
461+
write_to="vllm/_version.py", # TODO: move this to pyproject.toml
462+
)
463+
except LookupError:
464+
version = "0.0.0"
461465

462466
sep = "+" if "+" not in version else "." # dev versions might contain +
463467

0 commit comments

Comments
 (0)