Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to list models in remote repository via jmm models #15

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

amisevsk
Copy link
Contributor

Description

Add optional argument to jmm models:

  jmm models [repository]

to optionally list models in a remote repository.

Example output:

❯ jmm models localhost:5050/testrepo --http
REPOSITORY   TAG    MAINTAINER   NAME            SIZE       DIGEST
testrepo     tag1   Gorkem       Densenet-ONNX   28.9 MiB   sha256:f86285ad9d0f7a4a621f4c9750a807dfcc481b03cf4503863d0b752ebe0648ea
testrepo     tag2   Gorkem       Densenet-ONNX   28.9 MiB   sha256:f86285ad9d0f7a4a621f4c9750a807dfcc481b03cf4503863d0b752ebe0648ea

❯ jmm models localhost:5050/testrepo:tag2 --http
REPOSITORY   TAG    MAINTAINER   NAME            SIZE       DIGEST
testrepo     tag2   Gorkem       Densenet-ONNX   28.9 MiB   sha256:f86285ad9d0f7a4a621f4c9750a807dfcc481b03cf4503863d0b752ebe0648ea

❯ jmm models localhost:5050/testrepo:tag3 --http
failed to read reference: localhost:5050/testrepo:tag3: not found

Testing instructions

  1. Build and push some models to a remote registry (see Add initial implementation for pushing and pulling models from remote OCI registries #11 for instructions)
  2. Run jmm models <repository> to list all tags in that repository
  3. Run jmm models <repository>:<tag> to see description of a single model

@amisevsk amisevsk requested a review from gorkem February 13, 2024 18:33
Copy link
Contributor

@gorkem gorkem left a comment

Choose a reason for hiding this comment

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

one note about the doc for the usehttp flag

Short: shortDesc,
Long: longDesc,
Run: RunCommand(opts),
}

cmd.Args = cobra.MaximumNArgs(1)
cmd.Flags().BoolVar(&flags.UseHTTP, "http", false, "Push to http registry")
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure if "Push to http registry" is a good explanation of this flag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, this is a copy-paste error

Add optional argument to jmm models:

  jmm models <reference>

to optionally list models in a remote repository. If <reference>
includes a tag, models only lists the model with that tag, if it exists.
@amisevsk amisevsk merged commit a84051c into main Feb 14, 2024
1 check passed
@amisevsk amisevsk deleted the remote-list branch February 14, 2024 18:51
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