9
9
pre-commit :
10
10
runs-on : ubuntu-latest
11
11
steps :
12
- - uses : actions/checkout@v4 # Use the latest stable version tag
13
- - uses : actions/setup-python@v5 # Use the latest stable version tag
12
+ - uses : actions/checkout@v4
13
+ - uses : actions/setup-python@v5
14
14
with :
15
15
python-version : " 3.12"
16
16
- run : echo "::add-matcher::.github/workflows/matchers/actionlint.json"
17
17
- run : echo "::add-matcher::.github/workflows/matchers/mypy.json"
18
18
- name : Set VLLM_TARGET_DEVICE to CPU for pre-commit checks
19
19
run : echo "VLLM_TARGET_DEVICE=cpu" >> $GITHUB_ENV
20
- - name : Install vLLM Build Dependencies
21
- run : pip install -r requirements/build.txt
20
+ - name : Install PyTorch for CPU
21
+ # Explicitly install the CPU version of PyTorch from their stable index.
22
+ # This ensures pip finds the correct wheel without the problematic '+cpu' tag.
23
+ # Check PyTorch's official website for the exact command for torch==2.6.0 CPU
24
+ # As of my last update, it would typically be:
25
+ run : pip install torch==2.6.0 --index-url https://download.pytorch.org/whl/cpu
26
+ - name : Install vLLM Build Dependencies (excluding torch, as it's already installed)
27
+ # We need to filter out torch from build.txt for this step
28
+ # A simple way is to use grep or sed, or if build.txt is small, just list others.
29
+ # Given build.txt has `torch==2.6.0`, we'll exclude it here.
30
+ run : pip install $(grep -v 'torch==' requirements/build.txt | tr '\n' ' ')
22
31
- name : Install vLLM Project and Dev Dependencies
23
32
run : pip install -e ".[dev]"
24
- - uses : pre-commit/action@v3.0.1 # Use the latest stable version tag
33
+
34
+ - uses : pre-commit/action@v3.0.1
25
35
with :
26
36
extra_args : --all-files --hook-stage manual
0 commit comments