Skip to content

Commit b1c9020

Browse files
authored
Update Actions (#497)
* Actions: Python 3.12: Override with VS 2022 17.9 Github Actions updated their runner image with VS 17.10 which is incompatible with older versions of CUDA. Force a downgrade to 17.9 and build. Signed-off-by: kingbri <bdashore3@proton.me> * Actions: Update to VS 2022 17.9 Github Actions updated their Windows runner image with VS 17.10 which is incompatible with older versions of CUDA. Force a downgrade to 17.9 and build. Signed-off-by: kingbri <bdashore3@proton.me> * Actions: Add Python 3.12 to releases Python 3.12 ExllamaV2 is stable. So, add it into builds. Signed-off-by: kingbri <bdashore3@proton.me> --------- Signed-off-by: kingbri <bdashore3@proton.me>
1 parent 34677da commit b1c9020

File tree

2 files changed

+104
-66
lines changed

2 files changed

+104
-66
lines changed

.github/workflows/build-wheels-release.yml

+79-51
Original file line numberDiff line numberDiff line change
@@ -20,54 +20,65 @@ jobs:
2020
matrix:
2121
include:
2222

23-
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.8', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
24-
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.8', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
25-
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.8', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
26-
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.9', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
27-
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.9', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
28-
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.9', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
29-
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
30-
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
31-
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
32-
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
33-
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
34-
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
35-
- { artname: 'wheel', os: windows-latest, pyver: '3.8', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
36-
- { artname: 'wheel', os: windows-latest, pyver: '3.8', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
37-
- { artname: 'wheel', os: windows-latest, pyver: '3.8', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
38-
- { artname: 'wheel', os: windows-latest, pyver: '3.9', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
39-
- { artname: 'wheel', os: windows-latest, pyver: '3.9', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
40-
- { artname: 'wheel', os: windows-latest, pyver: '3.9', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
41-
- { artname: 'wheel', os: windows-latest, pyver: '3.10', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
42-
- { artname: 'wheel', os: windows-latest, pyver: '3.10', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
43-
- { artname: 'wheel', os: windows-latest, pyver: '3.10', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
44-
- { artname: 'wheel', os: windows-latest, pyver: '3.11', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
45-
- { artname: 'wheel', os: windows-latest, pyver: '3.11', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
46-
- { artname: 'wheel', os: windows-latest, pyver: '3.11', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
47-
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '', rocm: '5.6', torch: '2.2.2', cudaarch: '' }
48-
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '', rocm: '6.0', torch: '2.3.0', cudaarch: '' }
49-
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '', rocm: '5.6', torch: '2.2.2', cudaarch: '' }
50-
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '', rocm: '6.0', torch: '2.3.0', cudaarch: '' }
23+
# Ubuntu 20.04 CUDA
24+
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.8', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
25+
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.8', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
26+
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.8', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
27+
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.9', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
28+
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.9', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
29+
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.9', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
30+
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
31+
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
32+
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
33+
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
34+
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
35+
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
36+
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.12', cuda: '11.8.0', rocm: '', torch: '2.3.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
37+
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.12', cuda: '12.1.0', rocm: '', torch: '2.3.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
38+
39+
# Windows 2022 CUDA
40+
- { artname: 'wheel', os: windows-2022, pyver: '3.8', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
41+
- { artname: 'wheel', os: windows-2022, pyver: '3.8', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
42+
- { artname: 'wheel', os: windows-2022, pyver: '3.8', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
43+
- { artname: 'wheel', os: windows-2022, pyver: '3.9', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
44+
- { artname: 'wheel', os: windows-2022, pyver: '3.9', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
45+
- { artname: 'wheel', os: windows-2022, pyver: '3.9', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
46+
- { artname: 'wheel', os: windows-2022, pyver: '3.10', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
47+
- { artname: 'wheel', os: windows-2022, pyver: '3.10', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
48+
- { artname: 'wheel', os: windows-2022, pyver: '3.10', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
49+
- { artname: 'wheel', os: windows-2022, pyver: '3.11', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
50+
- { artname: 'wheel', os: windows-2022, pyver: '3.11', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
51+
- { artname: 'wheel', os: windows-2022, pyver: '3.11', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
52+
- { artname: 'wheel', os: windows-2022, pyver: '3.12', cuda: '11.8.0', rocm: '', torch: '2.3.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
53+
- { artname: 'wheel', os: windows-2022, pyver: '3.12', cuda: '12.1.0', rocm: '', torch: '2.3.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
54+
55+
# Ubuntu 20.04 ROCm
56+
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '', rocm: '5.6', torch: '2.2.2', cudaarch: '' }
57+
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '', rocm: '6.0', torch: '2.3.0', cudaarch: '' }
58+
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '', rocm: '5.6', torch: '2.2.2', cudaarch: '' }
59+
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '', rocm: '6.0', torch: '2.3.0', cudaarch: '' }
60+
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.12', cuda: '', rocm: '6.0', torch: '2.3.1', cudaarch: '' }
5161

5262
# sdist
53-
- { artname: 'sdist', os: ubuntu-20.04, pyver: '3.11', cuda: '', rocm: '', torch: '2.3.0', cudaarch: '' }
54-
55-
# Extra Torch 2.2 wheels for Windows until PyTorch resolves the shm.dll issue
56-
- { artname: 'wheel', os: windows-latest, pyver: '3.8', cuda: '11.8.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
57-
- { artname: 'wheel', os: windows-latest, pyver: '3.8', cuda: '12.1.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
58-
- { artname: 'wheel', os: windows-latest, pyver: '3.9', cuda: '11.8.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
59-
- { artname: 'wheel', os: windows-latest, pyver: '3.9', cuda: '12.1.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
60-
- { artname: 'wheel', os: windows-latest, pyver: '3.10', cuda: '11.8.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
61-
- { artname: 'wheel', os: windows-latest, pyver: '3.10', cuda: '12.1.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
62-
- { artname: 'wheel', os: windows-latest, pyver: '3.11', cuda: '11.8.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
63-
- { artname: 'wheel', os: windows-latest, pyver: '3.11', cuda: '12.1.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
63+
- { artname: 'sdist', os: ubuntu-20.04, pyver: '3.11', cuda: '', rocm: '', torch: '2.3.0', cudaarch: '' }
64+
65+
# Extra Torch 2.2 wheels for Windows 2022 until PyTorch resolves the shm.dll issue
66+
- { artname: 'wheel', os: windows-2022, pyver: '3.8', cuda: '11.8.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
67+
- { artname: 'wheel', os: windows-2022, pyver: '3.8', cuda: '12.1.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
68+
- { artname: 'wheel', os: windows-2022, pyver: '3.9', cuda: '11.8.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
69+
- { artname: 'wheel', os: windows-2022, pyver: '3.9', cuda: '12.1.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
70+
- { artname: 'wheel', os: windows-2022, pyver: '3.10', cuda: '11.8.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
71+
- { artname: 'wheel', os: windows-2022, pyver: '3.10', cuda: '12.1.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
72+
- { artname: 'wheel', os: windows-2022, pyver: '3.11', cuda: '11.8.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
73+
- { artname: 'wheel', os: windows-2022, pyver: '3.11', cuda: '12.1.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
74+
- { artname: 'wheel', os: windows-2022, pyver: '3.12', cuda: '11.8.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
75+
- { artname: 'wheel', os: windows-2022, pyver: '3.12', cuda: '12.1.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
6476

6577
defaults:
6678
run:
6779
shell: pwsh
6880

6981
steps:
70-
7182
# Free disk space
7283

7384
- name: Free Disk Space
@@ -106,6 +117,12 @@ jobs:
106117
Write-Output "PACKAGE_VERSION=None" >> "$env:GITHUB_OUTPUT"
107118
}
108119
120+
# Pin VS build tools to 17.9 so builds won't fail
121+
122+
- name: Install VS2022 BuildTools 17.9.7
123+
run: choco install -y visualstudio2022buildtools --version=117.9.7.0 --params "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --installChannelUri https://aka.ms/vs/17/release/180911598_-255012421/channel"
124+
if: runner.os == 'Windows'
125+
109126
# Install ROCm SDK, apparently needs to happen before setting up Python
110127

111128
- name: Build for ROCm
@@ -133,8 +150,9 @@ jobs:
133150
134151
# --- Install dependencies
135152
153+
python3 -m ensurepip --upgrade
136154
pip3 install torch==${{ matrix.torch }} --index-url="https://download.pytorch.org/whl/rocm$ROCM_VERSION"
137-
pip3 install --upgrade build wheel safetensors sentencepiece ninja
155+
pip3 install --upgrade setuptools>=70.0.0 build wheel safetensors sentencepiece ninja
138156
pip3 cache purge
139157
140158
# --- Build wheel
@@ -147,7 +165,7 @@ jobs:
147165
if: matrix.cuda != ''
148166
uses: conda-incubator/setup-miniconda@v2.3.0
149167
with:
150-
activate-environment: "build"
168+
activate-environment: "exllama"
151169
python-version: ${{ matrix.pyver }}
152170
miniforge-variant: Mambaforge
153171
miniforge-version: latest
@@ -158,17 +176,20 @@ jobs:
158176
- name: Build for CUDA
159177
if: matrix.cuda != ''
160178
run: |
179+
# --- Spawn the VS shell
180+
if ($IsWindows) {
181+
Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll'
182+
Enter-VsDevShell -VsInstallPath 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools' -DevCmdArguments '-arch=x64 -host_arch=x64'
183+
$env:DISTUTILS_USE_SDK=1
184+
}
185+
161186
# --- Install CUDA using Conda
162-
163187
$cudaVersion = '${{ matrix.cuda }}'
164188
$cudaVersionPytorch = '${{ matrix.cuda }}'.Remove('${{ matrix.cuda }}'.LastIndexOf('.')).Replace('.','')
165189

166-
$cudaChannels = ''
167-
$cudaNum = [int]$cudaVersion.substring($cudaVersion.LastIndexOf('.')+1)
168-
while ($cudaNum -ge 0) { $cudaChannels += '-c nvidia/label/cuda-' + $cudaVersion.Remove($cudaVersion.LastIndexOf('.')+1) + $cudaNum + ' '; $cudaNum-- }
169-
mamba install -y 'cuda' $cudaChannels.TrimEnd().Split()
170-
171-
if (!(mamba list cuda)[-1].contains('cuda')) {sleep -s 10; mamba install -y 'cuda' $cudaChannels.TrimEnd().Split()}
190+
mamba install -y -c nvidia/label/cuda-$cudaVersion cuda-toolkit cuda-runtime
191+
192+
if (!(mamba list cuda)[-1].contains('cuda')) {sleep -s 10; mamba install -y 'cuda' $cudaVersion}
172193
if (!(mamba list cuda)[-1].contains('cuda')) {throw 'CUDA Toolkit failed to install!'}
173194

174195
$env:CUDA_PATH = $env:CONDA_PREFIX
@@ -177,9 +198,9 @@ jobs:
177198

178199
# --- Install dependencies
179200

201+
python -m ensurepip --upgrade
180202
python -m pip install torch==${{ matrix.torch }} --index-url https://download.pytorch.org/whl/cu$cudaVersionPytorch
181-
python -m pip install --upgrade setuptools==65.5.1
182-
python -m pip install --upgrade build wheel safetensors sentencepiece ninja
203+
python -m pip install --upgrade setuptools>=70.0.0 build wheel safetensors sentencepiece ninja
183204

184205
# --- Build wheel
185206

@@ -192,6 +213,13 @@ jobs:
192213
- name: Build sdist
193214
if: matrix.cuda == '' && matrix.rocm == ''
194215
run: |
216+
# --- Spawn the VS shell
217+
if ($IsWindows) {
218+
Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll'
219+
Enter-VsDevShell -VsInstallPath 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools' -DevCmdArguments '-arch=x64 -host_arch=x64'
220+
$env:DISTUTILS_USE_SDK=1
221+
}
222+
195223
# --- Install dependencies
196224
197225
python -m pip install torch==${{ matrix.torch }} --index-url https://download.pytorch.org/whl/cpu

0 commit comments

Comments
 (0)