kleveross / ormb

Docker for Your ML/DL Models Based on OCI Artifacts
Apache License 2.0
461 stars 61 forks source link

[Bug] Save/Tag interpret numeric tags as port numbers #209

Closed andrewm-aero closed 10 months ago

andrewm-aero commented 2 years ago

Is this a BUG REPORT or FEATURE REQUEST?: Bug Report

/kind bug

What happened:

ormb save . foo:1

This creates a model foo:1 with tag latest, which is not a valid OCI ref.

What you expected to happen:

A new model, with repository foo and tag 1 to be created

How to reproduce it (as minimally and precisely as possible):

$ ormb save . foo:1
ref:       foo:1:latest
digest:    4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1
size:      32B
format:    Others
latest: saved

Compare with

$ docker build -t foo:1 .
...
Successfully tagged foo:1

Anything else we need to know?:

Appears to be improper handling of port numbers in the registry component of the ref, e.g. ormb save . local.host:8080/foo:1 works as expected.

$ ormb version
Version: 0.1.0-rc.2
Git SHA: ede0dc0c04a7d6386c0d1f6b6e8e5d361a5df2f0
Repo Root: git@github.com:gaocegege/ormb.git
Go Version: go1.17.2
Go OS/Arch: linux/amd64