mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-10 07:46:59 +00:00
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:
13
.github/workflows/tesla-k80-ci.yml
vendored
13
.github/workflows/tesla-k80-ci.yml
vendored
@@ -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
|
||||
|
||||
@@ -30,8 +30,6 @@ jobs:
|
||||
chmod +x ollama
|
||||
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: Verify multi-GPU setup
|
||||
run: |
|
||||
@@ -51,21 +49,15 @@ jobs:
|
||||
go build -o ../../test-runner .
|
||||
cd ../..
|
||||
ls -lh test-runner
|
||||
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: Validate multi-GPU test configuration
|
||||
run: |
|
||||
./test-runner validate --config test/config/models.yaml --profile multi-gpu
|
||||
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: Run multi-GPU tests
|
||||
run: |
|
||||
./test-runner run --profile multi-gpu --config test/config/models.yaml --output test-report-multi-gpu --verbose
|
||||
timeout-minutes: 60
|
||||
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: Check multi-GPU test results
|
||||
run: |
|
||||
|
||||
10
.github/workflows/tesla-k80-single-gpu-tests.yml
vendored
10
.github/workflows/tesla-k80-single-gpu-tests.yml
vendored
@@ -27,8 +27,6 @@ jobs:
|
||||
chmod +x ollama
|
||||
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: Build test-runner
|
||||
run: |
|
||||
@@ -38,21 +36,15 @@ jobs:
|
||||
go build -o ../../test-runner .
|
||||
cd ../..
|
||||
ls -lh test-runner
|
||||
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: Validate test configuration
|
||||
run: |
|
||||
./test-runner validate --config test/config/quick.yaml
|
||||
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: Run quick tests
|
||||
run: |
|
||||
./test-runner run --profile quick --config test/config/quick.yaml --output test-report-quick --verbose
|
||||
timeout-minutes: 10
|
||||
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: Check quick test results
|
||||
run: |
|
||||
@@ -79,8 +71,6 @@ jobs:
|
||||
run: |
|
||||
./test-runner run --profile full --config test/config/models.yaml --output test-report-full --verbose
|
||||
timeout-minutes: 45
|
||||
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: Check full test results
|
||||
if: success()
|
||||
|
||||
Reference in New Issue
Block a user