MLS-C01 Question 275
Select 4You are tasked with deploying a machine learning model using Amazon SageMaker. To package the model, you need to create a custom Docker container that includes specific dependencies and a custom inference script. Which steps are required to successfully create and deploy the Docker container for SageMaker?
- A
Write a Dockerfile to define the container environment, including the required dependencies and the custom inference script.
- B
Build the Docker image locally and push it to Amazon S3 for SageMaker to pull during deployment.
- C
Tag the Docker image with an Amazon Elastic Container Registry (ECR) repository URI after building it.
- D
Push the Docker image to an Amazon Elastic Container Registry (ECR) repository.
- E
Specify the ECR image URI when creating a SageMaker model or endpoint configuration.
Show answer and explanation
Correct answers: A, C, D, E
Explanation
To deploy a custom model with Amazon SageMaker using Docker containers, you must first create a Dockerfile to define the environment and dependencies. After building the image locally, you tag it with the ECR repository URI and push it to ECR. Finally, the ECR image URI is specified when creating a SageMaker model or endpoint configuration. SageMaker does not support pulling Docker images from sources like Amazon S3; it requires images to be stored in ECR.
- A. Correct.
Correct. A Dockerfile is used to define the environment, dependencies, and scripts required in the container.
- B. Incorrect.
Incorrect. Docker images must be pushed to Amazon ECR, not Amazon S3, to be used by SageMaker.
- C. Correct.
Correct. Tagging the Docker image with the ECR repository URI is required before pushing the image to ECR.
- D. Correct.
Correct. The Docker image must be pushed to an Amazon ECR repository so that SageMaker can access it.
- E. Correct.
Correct. When deploying the model, SageMaker uses the ECR image URI to locate and pull the container.