- Newest
- Most votes
- Most comments
Hello,
As from the post, I understand that you are trying to create a SageMaker model using a Python 10 image. The image builds successfully, but you encounter the following OCI manifest error when attempting to use it:
Unsupported manifest media type application/vnd.oci.image.manifest.v1+json for image <image>. Ensure that valid manifest media type is used for specified image. (Service: AmazonSageMaker; Status Code: 400; Error Code: ValidationException; Request ID: ******; Proxy: null).
The error message points to, "vnd.oci.image.manifest.v1+json", this is not a supported manifest media type. Amazon ECR supports the following container image manifest formats:
- Docker Image Manifest V2 Schema 1 (used with Docker version 1.9 and older)
- Docker Image Manifest V2 Schema 2 (used with Docker version 1.10 and newer)
- Open Container Initiative (OCI) Specifications (v1.0 and up)
————————— For OCI specifically, when used, the mediaType field must contain the media type "application/vnd.oci.image.manifest.v1+json". [1]
For Docker Image Manifest V2 Schema 1, mediaType field must contain the media type "application/vnd.docker.distribution.manifest.v1+json". [2]
And for Docker Image Manifest V2 Schema 2, mediaType field most commonly contains the media type "application/vnd.docker.distribution.manifest.v2+json". [3] —————————
Here Docker V2 manifest media type is accepted by the ECR and is supported by the create model and endpoint actions, where supported mediatype manifest is application/vnd.docker.distribution.manifest.v2+json. Please note that as of the current version, SageMaker's CreateModel operation predominantly supports Docker V2 manifest media type, specifically "application/vnd.docker.distribution.manifest.v2+json". Although ECR does support other manifest types, such as the Open Container Initiative (OCI) Specifications (v1.0 and up), SageMaker currently does not for the CreateModel operation.
I understand that this might not be the most convenient situation, especially if you are working with OCI formatted images. I'll relay your feedback to our internal team for consideration in future support and enhancements.
Next Steps:
To address the error you've faced, I recommend specifying the --format
option to docker
when building your image, as described in the below third party link not vouched by AWS. This ensures the image is in a format that SageMaker's CreateModel operation supports:
[+] https://stackoverflow.com/questions/74229726/error-when-using-createmodel-function-for-sagemaker
I hope I was able to address your query on the post, in case of any follow-up queries/clarifications. Please proceed to open a case with AWS Support Engineering at [4]. Thanks for your patience & cooperation!
References:
[1] https://github.com/opencontainers/image-spec/blob/main/manifest.md#image-manifest-property-descriptions [2] https://docs.docker.com/registry/spec/manifest-v2-1/ [3] https://docs.docker.com/registry/spec/manifest-v2-2/ [4] https://console.aws.amazon.com/support/home#/case/create?issueType=technical
Relevant content
- asked 2 years ago
- asked a year ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 5 months ago