Stabilize CI disk usage and run Ollama E2E on arm64#2167
Conversation
Place both uv cache and project environments on /mnt, and pin Ollama while disabling unstable AVX-512/AMX CPU backends before E2E inference on AMD64 runners. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ca3a8dc1-1c88-4c27-88e1-07f7e18b3e6b
Log CPU metadata and enabled backends for ARM runners too, and leave previously disabled libraries untouched. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ca3a8dc1-1c88-4c27-88e1-07f7e18b3e6b
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce CI flakiness by (1) moving uv’s project virtual environment onto the larger /mnt disk to avoid workspace disk pressure, and (2) stabilizing Ollama inference on affected AMD64 runners by pinning the Ollama image version and adding a helper to disable problematic CPU backends before the first model pull/inference.
Changes:
- Pin the Ollama Docker image to
0.32.0(with an overridableOLLAMA_VERSIONdefault) instead of usinglatest. - Move uv’s project environment to
/mntviaUV_PROJECT_ENVIRONMENTand create/chown the required/mntdirectories before cache restore/uv usage. - Add and invoke a CI helper script which disables specific GGML CPU backend variants in the Ollama container, restarts Ollama, and polls readiness before the model pull/inference step.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docker-compose.yml | Pin Ollama image to a versioned tag while allowing override via OLLAMA_VERSION. |
| .github/workflows/ci.yml | Put uv’s project env on /mnt and invoke the Ollama CPU-backend workaround before model pull/inference in E2E jobs. |
| .github/scripts/configure-ollama-cpu-backend.sh | New helper to quarantine selected Ollama GGML CPU backend variants, restart the container, and wait for readiness. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 15a357e4-85bf-4b12-bca8-a9c3e3e45b2c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 15a357e4-85bf-4b12-bca8-a9c3e3e45b2c
Coverage report (presidio-anonymizer)Click to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||
Coverage report (presidio-cli)Click to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ca3a8dc1-1c88-4c27-88e1-07f7e18b3e6b
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ca3a8dc1-1c88-4c27-88e1-07f7e18b3e6b
Coverage report (presidio-image-redactor)Click to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||
Coverage report (presidio-analyzer)Click to see where and how coverage changed
The report is truncated to 25 files out of 72. To see the full report, please visit the workflow summary page. This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ca3a8dc1-1c88-4c27-88e1-07f7e18b3e6b
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ca3a8dc1-1c88-4c27-88e1-07f7e18b3e6b
This pull request updates the CI workflow to improve dependency management, optimize disk usage, and make E2E tests more robust and platform-specific. It also pins the
ollamaDocker image to a specific version for reproducibility. The most important changes are grouped below.Dependency management and disk usage improvements:
uvpackage environment and cache are now co-located on/mntto enable hardlinking, reducing disk usage and avoiding duplicate package installations. The environment variableUV_PROJECT_ENVIRONMENTis introduced, andUV_LINK_MODEis set tohardlink. Additionally,PIP_NO_CACHE_DIRis set to prevent pip from creating its own cache. (.github/workflows/ci.yml)UV_CACHE_DIRandUV_PROJECT_ENVIRONMENTdirectories and assigns correct permissions to both, ensuring the runner user can access them. (.github/workflows/ci.yml)uvcache to reclaim disk space before running tests, and removes the redundant final cache pruning step. (.github/workflows/ci.yml) [1] [2]presidio-analyzernow specifies the Python interpreter from the new environment, ensuring consistency. (.github/workflows/ci.yml)E2E test improvements:
linux/arm64runners, skipping Ollama-related tests on other platforms to avoid failures. The Docker container is now referenced more robustly, and test selection is conditional based on platform. (.github/workflows/ci.yml) [1] [2]Reproducibility:
ollamaDocker image is pinned to version0.32.0with a specific digest, ensuring consistent test environments. (docker-compose.yml)