Manifest error when staging ML model

0

I am trying to produce a model on a python10 image that successfully builds but runs into the following oci manifest error when aws tries 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).

Any help as to how I can resolve this is much appreciated.

pjalali
asked 2 months ago273 views
1 Answer
0

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:

  1. Docker Image Manifest V2 Schema 1 (used with Docker version 1.9 and older)
  2. Docker Image Manifest V2 Schema 2 (used with Docker version 1.10 and newer)
  3. 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

AWS
answered 2 months ago
profile picture
EXPERT
reviewed 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions