Fix GitHub Actions workflows to upload build libraries and remove LD_LIBRARY_PATH

Changes:
- Update tesla-k80-ci.yml to upload build/lib/ollama/ containing CUDA backend
- Remove all LD_LIBRARY_PATH environment variables (no longer needed with RPATH)
- Test workflows now receive libggml-cuda.so enabling GPU offload

This fixes the issue where test workflows couldn't offload to GPU because the
CUDA backend library wasn't included in the artifact.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Shang Chieh Tseng
2025-10-30 15:08:34 +08:00
parent d8ea75a3e2
commit d9d3f7b0b4
3 changed files with 4 additions and 27 deletions

View File

@@ -28,31 +28,26 @@ jobs:
CC=/usr/local/bin/gcc CXX=/usr/local/bin/g++ cmake -B build
env:
CMAKE_BUILD_TYPE: Release
LD_LIBRARY_PATH: /usr/local/cuda-11.4/lib64:/usr/local/cuda-11.4/targets/x86_64-linux/lib:/usr/lib64:/usr/local/lib64
- name: Build C++/CUDA components
run: |
CC=/usr/local/bin/gcc CXX=/usr/local/bin/g++ cmake --build build -j$(nproc)
timeout-minutes: 30
env:
LD_LIBRARY_PATH: /usr/local/cuda-11.4/lib64:/usr/local/cuda-11.4/targets/x86_64-linux/lib:/usr/lib64:/usr/local/lib64
- name: Build Go binary
run: |
go build -v -o ollama .
env:
LD_LIBRARY_PATH: /usr/local/cuda-11.4/lib64:/usr/local/cuda-11.4/targets/x86_64-linux/lib:/usr/lib64:/usr/local/lib64
- name: Verify binary was created
run: |
ls -lh ollama
./ollama --version
env:
LD_LIBRARY_PATH: /usr/local/cuda-11.4/lib64:/usr/local/cuda-11.4/targets/x86_64-linux/lib:/usr/lib64:/usr/local/lib64
- name: Upload ollama binary as artifact
- name: Upload ollama binary and libraries as artifact
uses: actions/upload-artifact@v4
with:
name: ollama-binary
path: ollama
path: |
ollama
build/lib/ollama/
retention-days: 7