aws-samples / amazon-sagemaker-immersion-day

MIT No Attribution
271 stars 222 forks source link

[Lab3c. Bring your own Container] fix Docker build issue #72

Open wpr7280 opened 1 year ago

wpr7280 commented 1 year ago

Issue #, if available: I want to build my own Docker image for SageMaker, according to the document https://catalog.us-east-1.prod.workshops.aws/workshops/63069e26-921c-4ce1-9cc7-dd882ff62575/en-US/lab3/option2

The code will unzip the scikit_bring_your_own.zip file, and the generated file will contain the DockerFile:

image

The docker hub image is used here. When executing the sm-docker build . --repository sagemaker-decision-trees:latest command, CodeBuild often reports an error and is restricted from obtaining it. The error message is as follows:

` Step 1/11 : FROM ubuntu:18.04

103 | toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit 104 |   105 | [Container] 2023/07/04 09:40:07 Command did not exit successfully docker build -t $IMAGE_REPO_NAME:$IMAGE_TAG . exit status 1 106 | [Container] 2023/07/04 09:40:07 Phase complete: BUILD State: FAILED 107 | [Container] 2023/07/04 09:40:07 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: docker build -t $IMAGE_REPO_NAME:$IMAGE_TAG .. Reason: exit status 1 108 | [Container] 2023/07/04 09:40:07 Entering phase POST_BUILD 109 | [Container] 2023/07/04 09:40:07 Running command echo Build completed on date 110 | Build completed on Tue Jul 4 09:40:07 UTC 2023 111 |   112 | [Container] 2023/07/04 09:40:07 Running command echo Pushing the Docker image... 113 | Pushing the Docker image... `

Description of changes:

Modify the content of DockerFile, change FROM ubuntu:18.04 to FROM public.ecr.aws/lts/ubuntu:18.04

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.