Skip to content

Commit cb80321

Browse files
Phqen1xclaude
andcommitted
ci: bundle CUDA runtime libs for portability on both platforms
Linux: add libcudart.so* to the bundled runtime libraries so binaries can run on systems without a matching CUDA toolkit installed. Windows: add id to cuda-toolkit step and robocopy cudart64/cublas64/ cublasLt64 DLLs into the zip so the build runs on machines without a pre-installed CUDA runtime. Addresses Copilot review comments on #7. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c69f479 commit cb80321

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ jobs:
160160
- name: Bundle CUDA runtime libraries
161161
run: |
162162
cuda_lib=/usr/local/cuda/lib64
163+
cp -v ${cuda_lib}/libcudart.so* build/bin/ 2>/dev/null || true
163164
cp -v ${cuda_lib}/libcublas.so* build/bin/ 2>/dev/null || true
164165
cp -v ${cuda_lib}/libcublasLt.so* build/bin/ 2>/dev/null || true
165166
cp -v ${cuda_lib}/libcurand.so* build/bin/ 2>/dev/null || true
@@ -214,6 +215,7 @@ jobs:
214215
repository: 'leejet/stable-diffusion.cpp'
215216

216217
- name: Install CUDA Toolkit
218+
id: cuda-toolkit
217219
uses: Jimver/cuda-toolkit@v0.2.22
218220
with:
219221
cuda: '12.8.0'
@@ -254,6 +256,7 @@ jobs:
254256
run: |
255257
Copy-Item ggml/LICENSE .\build\bin\Release\ggml.txt
256258
Copy-Item LICENSE .\build\bin\Release\stable-diffusion.cpp.txt
259+
robocopy "${{ steps.cuda-toolkit.outputs.CUDA_PATH }}\bin" .\build\bin\Release cudart64_*.dll cublas64_*.dll cublasLt64_*.dll; if ($LASTEXITCODE -le 7) { $LASTEXITCODE = 0 }
257260
7z a sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-windows-cuda-${{ matrix.sm }}-x64.zip .\build\bin\Release\*
258261
259262
- name: Upload artifacts

0 commit comments

Comments
 (0)