← Back to Pull requests

Adopt lean service-base image in services Container file #1689

Closed
unknown closed this pull request without merging on Nov 05, 2026 12:13 UTC
View on GitHub
unknown unknown commented on Oct 29, 2026 13:20 UTC
Author

Description

This PR moves every service image onto the new lean service-base image (v0.0.48, up from v0.0.45). Each service now installs its own dependencies in its own Containerfile, so the base image no longer has to carry service specific pkgs.

Changes

Base image bump


  • chatbot, digitize, extract, similarity, summarize and translate now use FROM icr.io/ai-services-cicd/service-base:v0.0.48.
  • Digitize


  • services/digitize/Containerfile installs the system packages docling needs: lcms2-devel, openblas-devel, freetype, libicu, libjpeg-turbo, and spatialindex-devel from EPEL.

  • services/digitize/requirements.txt now lists the docling and ML stack (docling, docling-core, docling-ibm-models, torch, torchvision, transformers, rapidocr, and others), all pinned.

  • New services/digitize/download_docling_models.py downloads the Layout and TableFormer models at build time into DOCLING_MODELS_PATH (/var/docling-models). The Hugging Face cache is deleted afterwards.

  • Sets HF_HUB_DISABLE_XET=1 for the model download step. This avoids a _PyImport_Init fatal error caused by hf-xet starting its Tokio runtime during huggingface_hub imports.
  • Extract and Translate


  • Both Containerfiles now run the pip install step that was previously commented out.

  • Added service-specific requirements.txt files:

  • - services/extract/requirements.txt: jsonschema==4.26.0
    - services/translate/requirements.txt: httpx==0.28.1

    Pip cleanup in service images


  • The base venv ships without pip. Service builds bootstrap it with ensurepip, install requirements, purge the cache, then remove pip again so the runtime image stays pip-free.
  • Docs


  • docs/proposals/lean-service-base-image.md now references service-base:v0.0.48.
  • Type of change


  • Bug fix

  • Enhancement / refactor

  • New feature

  • Documentation update
  • Testing


  • Build each service image against service-base:v0.0.48

  • Digitize image: confirm docling models are present at /var/docling-models

  • Extract and Translate images: start up and import their new dependencies

  • Confirm pip is not present in the final images
  • Diff: 281 lines (+210 / -71) across 3 files Reviewer: mkumatag Review duration: 10012m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 281 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.338
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1689"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.7% (MEDIUM) · Higher = larger blast radius
    39.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.7% · Safe to merge
    15.7%