Skip to content

feat: bake LightGBM boosters + auto-mirror to Selectel (0.6.1) - #18

Merged
anthrax63 merged 1 commit into
mainfrom
feat/bake-models-and-mirror-selcloud
Aug 14, 2026
Merged

feat: bake LightGBM boosters + auto-mirror to Selectel (0.6.1)#18
anthrax63 merged 1 commit into
mainfrom
feat/bake-models-and-mirror-selcloud

Conversation

@anthrax63

Copy link
Copy Markdown
Member

Summary

  • Bake models into the image. models/hh_..txt and models/cg_..txt checked into git; Dockerfile COPY models/ /models/ + ENV KZ_SCORING_{HH,CG}_MODEL_PATH default to those paths. Consumers can still override the paths or mount a different volume at /models.
  • Auto-mirror to Selectel. Workflow mirrors every ghcr tag to cr.selcloud.ru/aggregion/main/kz-scoring-api:<same-tag> via docker buildx imagetools create. Requires repo secrets SELCLOUD_USERNAME and SELCLOUD_PASSWORD (already set).
  • Version bump 0.6.0 → 0.6.1.

Rationale: PKB pulls via reg.1cb.kz/library/aggregion/... alias which proxies our Selectel path. Until now I was manually building -models variant locally and pushing to Selectel, which was error-prone and drifted from ghcr digests. This closes both problems in one workflow.

Test plan

  • pytest locally — 93 passed.
  • Merge → CI publishes ghcr.io/aggregion/kz-scoring-api:v0.6.1 and mirrors it to Selectel with the same digest.
  • Inside pushed image: /models/*.txt present, env preset.
  • Update PKB chart image.tag: v0.6.1, redeploy, hit /single.

Rotation from now on

Replace models/*.txt → PR → merge → CI ships a new tag with fresh boosters. No hand-built images, no PVC dance.

… (0.6.1)

Ship the two boosters inside the image at /models/*.txt with matching
KZ_SCORING_{HH,CG}_MODEL_PATH env defaults, so no external volume or
init-container is needed. Existing installs can still override the paths or
mount a different volume at /models; nothing existing breaks.

Rotation is now: replace the two .txt in models/, PR, merge — CI produces
a new versioned image with the new boosters baked in.

The workflow now also mirrors every ghcr tag to
cr.selcloud.ru/aggregion/main/kz-scoring-api:<same-tag> via `docker buildx
imagetools create` so PKB's `reg.1cb.kz/library/aggregion/kz-scoring-api`
pull-through alias sees the same digest. Requires two new repo secrets
(SELCLOUD_USERNAME, SELCLOUD_PASSWORD) which are already set.

Version bumped to 0.6.1.
@anthrax63
anthrax63 merged commit 10a2f9f into main Aug 14, 2026
3 checks passed
@anthrax63
anthrax63 deleted the feat/bake-models-and-mirror-selcloud branch August 14, 2026 10:49
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.

1 participant