Skip to content

Stabilize CI disk usage and run Ollama E2E on arm64#2167

Open
SharonHart wants to merge 8 commits into
mainfrom
fix-ci-disk-ollama
Open

Stabilize CI disk usage and run Ollama E2E on arm64#2167
SharonHart wants to merge 8 commits into
mainfrom
fix-ci-disk-ollama

Conversation

@SharonHart

@SharonHart SharonHart commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

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 ollama Docker image to a specific version for reproducibility. The most important changes are grouped below.

Dependency management and disk usage improvements:

  • The uv package environment and cache are now co-located on /mnt to enable hardlinking, reducing disk usage and avoiding duplicate package installations. The environment variable UV_PROJECT_ENVIRONMENT is introduced, and UV_LINK_MODE is set to hardlink. Additionally, PIP_NO_CACHE_DIR is set to prevent pip from creating its own cache. (.github/workflows/ci.yml)
  • The workflow now explicitly prepares both the UV_CACHE_DIR and UV_PROJECT_ENVIRONMENT directories and assigns correct permissions to both, ensuring the runner user can access them. (.github/workflows/ci.yml)
  • After dependencies are installed, the workflow prunes the uv cache to reclaim disk space before running tests, and removes the redundant final cache pruning step. (.github/workflows/ci.yml) [1] [2]
  • The editable install of presidio-analyzer now specifies the Python interpreter from the new environment, ensuring consistency. (.github/workflows/ci.yml)

E2E test improvements:

  • The E2E workflow now only downloads and runs the Ollama model on linux/arm64 runners, 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:

  • The ollama Docker image is pinned to version 0.32.0 with a specific digest, ensuring consistent test environments. (docker-compose.yml)

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
Copilot AI review requested due to automatic review settings July 15, 2026 12:05
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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 overridable OLLAMA_VERSION default) instead of using latest.
  • Move uv’s project environment to /mnt via UV_PROJECT_ENVIRONMENT and create/chown the required /mnt directories 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.

Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/scripts/configure-ollama-cpu-backend.sh Outdated
Copilot AI review requested due to automatic review settings July 15, 2026 12:09
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 15a357e4-85bf-4b12-bca8-a9c3e3e45b2c

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread .github/scripts/configure-ollama-cpu-backend.sh Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 15a357e4-85bf-4b12-bca8-a9c3e3e45b2c
Copilot AI review requested due to automatic review settings July 15, 2026 12:21
@SharonHart SharonHart changed the title Stabilize CI disk usage and Ollama AMX inference Stabilize CI disk usage and run Ollama E2E on arm64 Jul 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (presidio-anonymizer)

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  presidio-anonymizer/presidio_anonymizer
  __init__.py
  anonymizer_engine.py
  presidio-anonymizer/presidio_anonymizer/operators
  custom.py
Project Total  

This report was generated by python-coverage-comment-action

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (presidio-structured)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (presidio-cli)

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  presidio-cli/presidio_cli
  cli.py
Project Total  

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 15, 2026 12:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ca3a8dc1-1c88-4c27-88e1-07f7e18b3e6b
Copilot AI review requested due to automatic review settings July 15, 2026 12:31
@SharonHart SharonHart changed the title Stabilize CI disk usage and run Ollama E2E on arm64 Stabilize CI disk usage and Ollama CPU backends Jul 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/scripts/prepare-ollama-cpu.sh Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (presidio-image-redactor)

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  presidio-image-redactor/presidio_image_redactor
  dicom_image_pii_verify_engine.py
  document_intelligence_ocr.py
  image_analyzer_engine.py
Project Total  

This report was generated by python-coverage-comment-action

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (presidio-analyzer)

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  presidio-analyzer/presidio_analyzer
  analyzer_engine.py
  entity_recognizer.py
  presidio-analyzer/presidio_analyzer/context_aware_enhancers
  lemma_context_aware_enhancer.py
  presidio-analyzer/presidio_analyzer/input_validation
  schemas.py
  yaml_recognizer_models.py
  presidio-analyzer/presidio_analyzer/nlp_engine
  __init__.py
  nlp_engine_provider.py
  presidio-analyzer/presidio_analyzer/predefined_recognizers
  __init__.py
  presidio-analyzer/presidio_analyzer/predefined_recognizers/country_specific
  __init__.py
  presidio-analyzer/presidio_analyzer/predefined_recognizers/country_specific/finland
  fi_personal_identity_code_recognizer.py
  presidio-analyzer/presidio_analyzer/predefined_recognizers/country_specific/germany
  de_bsnr_recognizer.py
  de_id_card_recognizer.py
  de_lanr_recognizer.py
  de_passport_recognizer.py
  de_social_security_recognizer.py
  de_tax_id_recognizer.py
  de_vat_id_recognizer.py
  presidio-analyzer/presidio_analyzer/predefined_recognizers/country_specific/india
  in_vehicle_registration_recognizer.py
  presidio-analyzer/presidio_analyzer/predefined_recognizers/country_specific/poland
  pl_pesel_recognizer.py
  presidio-analyzer/presidio_analyzer/predefined_recognizers/country_specific/singapore
  sg_uen_recognizer.py
  presidio-analyzer/presidio_analyzer/predefined_recognizers/country_specific/us
  us_ssn_recognizer.py
  presidio-analyzer/presidio_analyzer/predefined_recognizers/generic
  phone_recognizer.py
  presidio-analyzer/presidio_analyzer/recognizer_registry
  recognizer_registry.py
  recognizer_registry_provider.py
  recognizers_loader_utils.py
Project Total  

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
Copilot AI review requested due to automatic review settings July 15, 2026 13:35
@SharonHart SharonHart changed the title Stabilize CI disk usage and Ollama CPU backends Stabilize CI disk usage and run Ollama E2E on arm64 Jul 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ca3a8dc1-1c88-4c27-88e1-07f7e18b3e6b
Copilot AI review requested due to automatic review settings July 15, 2026 13:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants