Skip to content

Commit 459cb6d

Browse files
committed
fix for pre-commit failed job - Error: vllm/executor/ray_distributed_executor.py:531: error: Library stubs not installed for "pkg_resources" (7)
Signed-off-by: Alexandru Badea <george-alexandru.badea@ionos.com>a Signed-off-by: Alexandru Badea <george-alexandru.badea@ionos.com>
1 parent b163288 commit 459cb6d

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/pre-commit.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,25 @@ jobs:
99
pre-commit:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-python@v5
12+
- uses: actions/checkout@v4 # Keep this as v4
13+
- uses: actions/setup-python@v5 # Keep this as v5
1414
with:
1515
python-version: "3.12"
1616
- run: echo "::add-matcher::.github/workflows/matchers/actionlint.json"
1717
- run: echo "::add-matcher::.github/workflows/matchers/mypy.json"
18-
- name: Set VLLM_TARGET_DEVICE to CPU for pre-commit checks
19-
run: echo "VLLM_TARGET_DEVICE=cpu" >> $GITHUB_ENV
18+
19+
- name: Set VLLM_TARGET_DEVICE and VLLM_CMAKE_ARGS for CPU build
20+
run: |
21+
echo "VLLM_TARGET_DEVICE=cpu" >> $GITHUB_ENV
22+
# Crucial: Tell CMake to explicitly disable CUDA usage.
23+
# This should override PyTorch/Caffe2's internal checks for CUDA libraries.
24+
echo "VLLM_CMAKE_ARGS=-DUSE_CUDA=OFF" >> $GITHUB_ENV
2025
- name: Install PyTorch for CPU
2126
run: pip install torch==2.6.0 --index-url https://download.pytorch.org/whl/cpu
2227
- name: Install vLLM Build Dependencies (excluding torch and comments)
23-
# This command filters out lines with 'torch==' AND lines starting with '#'
2428
run: pip install $(grep -v 'torch==' requirements/build.txt | grep -v '^#' | tr '\n' ' ')
2529
- name: Install vLLM Project and Dev Dependencies
2630
run: pip install -e ".[dev]"
27-
28-
- uses: pre-commit/action@v3.0.1
31+
- uses: pre-commit/action@v3.0.1 # Keep this as v3.0.1
2932
with:
3033
extra_args: --all-files --hook-stage manual

0 commit comments

Comments
 (0)