Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@
"s3_bucket = None # must be same as CloudFormation parameter S3BucketName\n",
"s3_prefix = 'sagemaker' # must be same as CloudFormation parameter FSxS3ImportPrefix\n",
"\n",
"# If the s3_prefix folder doesn't exist in your S3 bucket, create it using AWS CLI:\n",
"# aws s3api put-object --bucket <your-bucket-name> --key sagemaker/\n",
"\n",
"role = get_execution_role() # you may provide a pre-existing role ARN here\n",
"print(f\"SageMaker Execution Role: {role}\")\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ then
fi


docker build -t ${image} $DIR/..
# docker build -t ${image} $DIR/..
# the --provenance=false flag is essential because SageMaker's model-hosting infrastructure
# does not fully support the modern OCI (Open Container Initiative) manifest indices that Docker Buildx creates by default.
docker buildx build --provenance=false --output type=docker -t ${image} $DIR/..
docker tag ${image} ${fullname}

# Get the login command from ECR and execute it directly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ then
aws ecr create-repository --region ${region} --repository-name "${image}" > /dev/null
fi

docker build -t ${image} $DIR/..
# docker build -t ${image} $DIR/..
# the --provenance=false flag is essential because SageMaker's model-hosting infrastructure
# does not fully support the modern OCI (Open Container Initiative) manifest indices that Docker Buildx creates by default.
docker buildx build --provenance=false --output type=docker -t ${image} $DIR/..

docker tag ${image} ${fullname}

# Get the login command from ECR and execute it directly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
" assert (\n",
" ecr_image_uri is not None\n",
" ), \"'sagemaker.model.image' or 'sagemaker.model.container' is required\"\n",
" pattern = \"\\.dkr\\.ecr\\.[a-z0-9-]+\\.\"\n",
" pattern = r\"\\.dkr\\.ecr\\.[a-z0-9-]+\\.\"\n",
" replace = f\".dkr.ecr.{aws_region}.\"\n",
" sm_model_config[\"image\"] = re.sub(pattern, replace, ecr_image_uri)\n",
"\n",
Expand Down Expand Up @@ -669,7 +669,8 @@
"outputs": [],
"source": [
"!pip install locust\n",
"!which locust"
"!which locust\n",
"!pip install matplotlib"
]
},
{
Expand Down