Implement pre-build repository check for Replicate images (#1733)
* Implement pre-build repository check for Replicate images
- 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 <github@redirecto.me>
* Implemented changes suggested by: @mattt
Signed-off-by: Itay Etelis <github@redirecto.me>
* Apply suggestions from code review
Signed-off-by: Mattt <mattt@me.com>
* Fix undefined: ManifestInspect
---------
Signed-off-by: Itay Etelis <github@redirecto.me>
Co-authored-by: Mattt Zmuda <mattt@replicate.com>