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

Implement pre-build repository check for Replicate images #1733

Merged
merged 4 commits into from
Jun 22, 2024

Conversation

Etelis
Copy link
Contributor

@Etelis Etelis commented Jun 11, 2024

  • Added the ManifestInspect function in pkg/docker to verify if a Docker image exists on a registry using the docker manifest inspect command.
  • Updated the push function in pkg/cli/push.go to include a check for the existence of a model on the Replicate registry before initiating the build process.
  • The validation step is conditionally executed only for images with the Replicate registry prefix, preventing unnecessary checks for other registries.
  • This change ensures that if a model does not exist on Replicate, the process stops early with a clear error message, avoiding the waste of time and resources on building and attempting to push a non-existent model.

References:

@Etelis Etelis force-pushed the 1678-check-model-before-build branch from 0b81fcb to c591912 Compare June 11, 2024 12:09
pkg/cli/push.go Outdated Show resolved Hide resolved
pkg/cli/push.go Outdated Show resolved Hide resolved
pkg/cli/push.go Outdated Show resolved Hide resolved
@Etelis
Copy link
Contributor Author

Etelis commented Jun 18, 2024

@mattt Any other notes on this?

Etelis and others added 3 commits June 22, 2024 05:52
- Added `ManifestInspect` function in `pkg/docker` to use `docker manifest inspect` for verifying if an image exists on a registry.
- Updated `push` function in `pkg/cli/push.go` to call `ManifestInspect` before building, specifically for Replicate images.
- Ensured early feedback if the model does not exist on Replicate, preventing unnecessary build time and resources.

Signed-off-by: Itay Etelis <[email protected]>
@mattt mattt force-pushed the 1678-check-model-before-build branch from 94a6a56 to bc4e9bb Compare June 22, 2024 12:52
@mattt
Copy link
Contributor

mattt commented Jun 22, 2024

@Etelis Thanks again for your work on this PR! I just applied one last suggestion from code review and rebased. Once CI passes, I'll get this merged in.

@mattt mattt merged commit 168ddc0 into replicate:main Jun 22, 2024
15 checks passed
@zeke
Copy link
Member

zeke commented Jun 26, 2024

Wow thanks @Etelis!

@allcontributors please add @Etelis for code

Copy link
Contributor

@zeke

I've put up a pull request to add @Etelis! 🎉

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.

3 participants