File tree 3 files changed +5
-3
lines changed
advanced_functionality/pytorch_extending_our_containers
3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 14
14
# For more information on creating a Dockerfile
15
15
# https://docs.docker.com/compose/gettingstarted/#step-2-create-a-dockerfile
16
16
# https://github.com/awslabs/amazon-sagemaker-examples/master/advanced_functionality/pytorch_extending_our_containers/pytorch_extending_our_containers.ipynb
17
+ ARG REGION=us-west-2
18
+
17
19
# SageMaker PyTorch image
18
- FROM 520713654638.dkr.ecr.us-west-2 .amazonaws.com/sagemaker-pytorch:0.4.0-cpu-py3
20
+ FROM 520713654638.dkr.ecr.$REGION .amazonaws.com/sagemaker-pytorch:0.4.0-cpu-py3
19
21
20
22
ENV PATH="/opt/ml/code:${PATH}"
21
23
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ $(aws ecr get-login --registry-ids 520713654638 --region ${region} --no-include-
47
47
# Build the docker image locally with the image name and then push it to ECR
48
48
# with the full name.
49
49
50
- docker build -t ${image} .
50
+ docker build -t ${image} . --build-arg REGION= ${region}
51
51
docker tag ${image} ${fullname}
52
52
53
53
docker push ${fullname}
Original file line number Diff line number Diff line change 322
322
" # Build the docker image locally with the image name and then push it to ECR\n " ,
323
323
" # with the full name.\n " ,
324
324
" \n " ,
325
- " docker build -t ${algorithm_name} .\n " ,
325
+ " docker build -t ${algorithm_name} . --build-arg REGION=${region} \n " ,
326
326
" docker tag ${algorithm_name} ${fullname}\n " ,
327
327
" \n " ,
328
328
" docker push ${fullname}"
You can’t perform that action at this time.
0 commit comments