Skip to content

ci : Enable pre-built cuda releases on ubuntu (#5106) #15249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,87 @@ jobs:
path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-vulkan-x64.zip
name: llama-bin-ubuntu-vulkan-x64.zip

ubuntu-22-cuda:
runs-on: ubuntu-22.04

strategy:
matrix:
cuda: ['11.7',"12.4"]

steps:
- name: Clone
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ubuntu-22-cmake-cuda-${{ matrix.cuda }}
evict-old-files: 1d

- name: Free up disk space
uses: jlumbroso/free-disk-space@main
with:
android: true
dotnet: true

- name: Dependencies
id: depends
run: |
sudo apt-get update
sudo apt-get install build-essential libcurl4-openssl-dev

- name: Install CUDA Toolkit
uses: Jimver/[email protected]
with:
cuda: ${{ matrix.cuda }}

- name: Build
id: cmake_build
run: |
cmake -B build \
-DCMAKE_INSTALL_RPATH='$ORIGIN' \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
-DGGML_BACKEND_DL=ON \
-DGGML_NATIVE=OFF \
-DGGML_CPU_ALL_VARIANTS=ON \
-DGGML_CUDA=ON \
${{ env.CMAKE_ARGS }}
cmake --build build --config Release -j $(nproc)

- name: Determine tag name
id: tag
uses: ./.github/actions/get-tag-name

- name: Pack artifacts
id: pack_artifacts
run: |
cp LICENSE ./build/bin/
zip -r llama-${{ steps.tag.outputs.name }}-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip ./build/bin/*

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip
name: llama-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip

- name: Pack CUDA runtime
id: pack_cuda_runtime
run: |
mkdir -p build/cuda-runtime
cp /usr/local/cuda/lib64/libcudart.so* build/cuda-runtime
cp /usr/local/cuda/lib64/libcublas.so* build/cuda-runtime
cp /usr/local/cuda/lib64/libcublasLt.so* build/cuda-runtime
zip -r cudart-llama-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip build/cuda-runtime/*

- name: Upload CUDA runtime
uses: actions/upload-artifact@v4
with:
path: cudart-llama-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip
name: cudart-llama-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip

windows-cpu:
runs-on: windows-2025

Expand Down Expand Up @@ -666,6 +747,7 @@ jobs:
- windows-hip
- ubuntu-22-cpu
- ubuntu-22-vulkan
- ubuntu-22-cuda
- macOS-arm64
- macOS-x64
- ios-xcode-build
Expand Down