Fix for CUDA on Windows (#1133)

This commit is contained in:
Raivis Dejus 2025-03-24 09:52:30 +02:00 committed by GitHub
commit afd70eab1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 35 additions and 4 deletions

View file

@ -123,16 +123,31 @@ jobs:
- uses: AnimMouse/setup-ffmpeg@v1.2.1
id: setup-ffmpeg
- name: Install dependencies
run: poetry install
# Adding windows Nvidia CUDA torch and its dependencies
# Linux only packages were removed from the list.
- name: Install CUDA torch for Windows
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
pip3 install torch==2.2.2+cu121 torchaudio==2.2.2+cu121 --index-url https://download.pytorch.org/whl/cu121
poetry source add --priority=supplemental torch https://download.pytorch.org/whl/cu121
poetry source add --priority=supplemental nvidia https://pypi.ngc.nvidia.com
poetry add torch==2.2.2+cu121
poetry add torchaudio==2.2.2+cu121
poetry add nvidia-cublas-cu12==12.1.3.1
poetry add nvidia-cuda-cupti-cu12==12.1.105
poetry add nvidia-cuda-nvrtc-cu12==12.1.105
poetry add nvidia-cuda-runtime-cu12==12.1.105
poetry add nvidia-cufft-cu12==11.0.2.54
poetry add nvidia-curand-cu12==10.3.2.106
poetry add nvidia-cusolver-cu12==11.4.5.107
poetry add nvidia-cusparse-cu12==12.1.0.106
poetry add nvidia-nvtx-cu12==12.1.105
fi
shell: bash
- name: Install dependencies
run: poetry install
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0" # Not needed with a .ruby-version file