Skip to content

Commit 96d7a35

Browse files
committed
Initial commit
0 parents  commit 96d7a35

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
ci:
12+
name: ci-${{ matrix.os }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os:
17+
- ubuntu-24.04
18+
steps:
19+
20+
- name: checkout
21+
uses: actions/checkout@v4
22+
23+
- name: setup-ollama
24+
uses: ./
25+
26+
- name: test-ollama
27+
run: |
28+
ollama run hf.co/unsloth/Qwen3-14B-GGUF:IQ3_XXS "/no_think write a simple forth interpreter in haskell, don't do parsing" --verbose

action.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: setup-ollama
2+
description: Setup Ollama on a hosted linux runner
3+
inputs:
4+
override_conf:
5+
description: override.conf for ollama.service
6+
required: false
7+
default: |
8+
[Service]
9+
Environment="OLLAMA_CONTEXT_LENGTH=32768"
10+
Environment="OLLAMA_DEBUG=1"
11+
Environment="OLLAMA_KEEP_ALIVE=-1"
12+
Environment="OLLAMA_MAX_LOADED_MODELS=1"
13+
Environment="OLLAMA_NUM_PARALLEL=1"
14+
Environment="OLLAMA_ORIGINS=*"
15+
runs:
16+
using: composite
17+
steps:
18+
- if: ${{ runner.os == 'Linux' }}
19+
run: |
20+
curl -fsSL https://ollama.com/install.sh | sh
21+
22+
if [[ $OVERRIDE_CONF != "" ]]; then
23+
sudo mkdir -p /etc/systemd/system/ollama.service.d
24+
echo "$OVERRIDE_CONF" | sudo tee /etc/systemd/system/ollama.service.d/override.conf
25+
26+
sudo systemctl daemon-reload
27+
sudo systemctl restart ollama.service
28+
fi
29+
shell: bash
30+
env:
31+
OVERRIDE_CONF: ${{ inputs.override_conf }}

0 commit comments

Comments
 (0)