feat: support packing and pushing directly to a remote registry - #1243
feat: support packing and pushing directly to a remote registry#1243Hemanth-1354 wants to merge 2 commits into
Conversation
97dfc2a to
b2e2b6b
Compare
amisevsk
left a comment
There was a problem hiding this comment.
Thanks @Hemanth-1354. I have a couple of minor comments, but otherwise this looks generally good. If you drop the changes to cli-reference.md and add the warning log on flags, this looks good to merge.
This doesn't fully hit what I was thinking for the issue, but is a great improvement nonetheless. A future (and significantly more complicated) improvement would be to do the push without storing the intermediate file on disk -- the tar writer could write directly into a remote connection and send the digest to seal the upload.
Add a --push flag to `kit pack` that streams the packed modelkit straight to the tagged remote registry, skipping local storage entirely. SaveModel and its layer/config helpers now operate on a generic oras.Target instead of a concrete local.LocalRepo, so the same pack pipeline can write to either local storage or a remote registry. Closes kitops-ml#1026 Signed-off-by: Hemanth-1354 <hemanthkumarpolisetti@gmail.com>
Signed-off-by: Hemanth-1354 <hemanthkumarpolisetti@gmail.com>
1b82d9e to
bdab9a1
Compare
|
Addressed all review feedback. Thanks for the review @amisevsk.
|
Description
Adds a
--pushflag tokit packthat streams the packed modelkit directly tothe remote registry specified by
--tag, skipping local storage entirely.Currently
kit packalways writes layers/config/manifest to the local on-diskcache before an optional separate
kit push, meaning a model is stored twice(source directory + local cache) before ever reaching the registry — costly in
CI environments where disk is limited. With
--push,SaveModeland its layerhelpers write to a generic
oras.Targetinstead of a concrete local repo, sothe same pack pipeline can target either local storage (default, unchanged
behavior) or a remote registry (
remote.NewRepository) directly. Digests arestill computed via a temporary file (required to know the digest before
pushing), but nothing is persisted to the permanent local ModelKit cache when
--pushis used.Follows the approach agreed with @amisevsk in the issue thread (flag named
--pushper that discussion).Linked issues
Closes #1026
AI-Assisted Code