Skip to content

Commit 027d9f4

Browse files
ci: pin ollama image to 0.31.2 and add warm-up health check (stanfordnlp#10041)
The llm_call_test job used the floating ollama/ollama:latest tag, which rolled to 0.32.0. That build's llama-server intermittently segfaults when serving llama3.2:3b, returning HTTP 500 from /api/generate and reddening the real-LM tests. Pin the server image to 0.31.2 (the last release that was latest during the stable period), bump the model cache key so a fresh model store is pulled against the pinned image, and add a warm-up generate that retries and dumps container logs so a bad model load fails fast with diagnostics instead of mid-test. Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent 6a6ff55 commit 027d9f4

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

‎.github/workflows/run_tests.yml‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,18 +142,32 @@ jobs:
142142
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
143143
with:
144144
path: ollama-data
145-
key: ollama-llama3.2-3b-${{ runner.os }}-v1
145+
key: ollama-llama3.2-3b-${{ runner.os }}-ollama0.31.2-v2
146146
- name: Start Ollama service
147147
run: |
148148
mkdir -p ollama-data
149149
docker run -d --name ollama \
150150
-p 11434:11434 \
151151
-v "$GITHUB_WORKSPACE/ollama-data:/root/.ollama" \
152-
ollama/ollama:latest
152+
ollama/ollama:0.31.2
153153
timeout 60 bash -c 'until curl -f http://localhost:11434/api/version; do sleep 2; done'
154154
- name: Pull LLM
155155
if: steps.cache-ollama.outputs.cache-hit != 'true'
156156
run: docker exec ollama ollama pull llama3.2:3b
157+
- name: Warm up LLM
158+
run: |
159+
for i in 1 2 3; do
160+
if curl -fsS http://localhost:11434/api/generate \
161+
-d '{"model":"llama3.2:3b","prompt":"ping","stream":false}'; then
162+
echo "Ollama warm-up succeeded"
163+
exit 0
164+
fi
165+
echo "Warm-up attempt $i failed; retrying..."
166+
sleep 5
167+
done
168+
echo "Ollama failed to serve llama3.2:3b after 3 attempts"
169+
docker logs ollama || true
170+
exit 1
157171
- name: Set LM environment variable
158172
run: echo "LM_FOR_TEST=ollama/llama3.2:3b" >> "$GITHUB_ENV"
159173
- name: Run tests

0 commit comments

Comments
 (0)