File tree 3 files changed +61
-0
lines changed
3 files changed +61
-0
lines changed Original file line number Diff line number Diff line change
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 qwen3:4b "write a haiku about haskell"
Original file line number Diff line number Diff line change
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_MAX_LOADED_MODELS=1"
11
+ Environment="OLLAMA_NUM_PARALLEL=1"
12
+ Environment="OLLAMA_ORIGINS=*"
13
+ runs :
14
+ using : composite
15
+ steps :
16
+ - if : ${{ runner.os == 'Linux' }}
17
+ run : ${{ github.action_path }}/setup.sh
18
+ shell : bash
19
+ env :
20
+ OVERRIDE_CONF : ${{ inputs.override_conf }}
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -euo pipefail
4
+
5
+ curl -fsSL https://ollama.com/install.sh | sh
6
+
7
+ if [[ $OVERRIDE_CONF != " " ]]; then
8
+ sudo mkdir -p /etc/systemd/system/ollama.service.d
9
+ echo " $OVERRIDE_CONF " | sudo tee /etc/systemd/system/ollama.service.d/override.conf
10
+
11
+ sudo systemctl daemon-reload
12
+ sudo systemctl restart ollama.service
13
+ fi
You can’t perform that action at this time.
0 commit comments