diff --git a/advanced_functionality/distributed-training-pipeline/dist_training_pipeline.ipynb b/advanced_functionality/distributed-training-pipeline/dist_training_pipeline.ipynb index 675fed4213..3e4cff2f30 100644 --- a/advanced_functionality/distributed-training-pipeline/dist_training_pipeline.ipynb +++ b/advanced_functionality/distributed-training-pipeline/dist_training_pipeline.ipynb @@ -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 --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", diff --git a/advanced_functionality/large-model-inference-testing/containers/openai-server-vllm/build_tools/build_and_push.sh b/advanced_functionality/large-model-inference-testing/containers/openai-server-vllm/build_tools/build_and_push.sh index 18e89159ce..01c1aedc84 100644 --- a/advanced_functionality/large-model-inference-testing/containers/openai-server-vllm/build_tools/build_and_push.sh +++ b/advanced_functionality/large-model-inference-testing/containers/openai-server-vllm/build_tools/build_and_push.sh @@ -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 diff --git a/advanced_functionality/large-model-inference-testing/containers/tritonserver-vllm/build_tools/build_and_push.sh b/advanced_functionality/large-model-inference-testing/containers/tritonserver-vllm/build_tools/build_and_push.sh index b4c55b8928..09357cfd1b 100644 --- a/advanced_functionality/large-model-inference-testing/containers/tritonserver-vllm/build_tools/build_and_push.sh +++ b/advanced_functionality/large-model-inference-testing/containers/tritonserver-vllm/build_tools/build_and_push.sh @@ -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 diff --git a/advanced_functionality/large-model-inference-testing/large_model_inference.ipynb b/advanced_functionality/large-model-inference-testing/large_model_inference.ipynb index 25240fff2b..9ddf8bccda 100644 --- a/advanced_functionality/large-model-inference-testing/large_model_inference.ipynb +++ b/advanced_functionality/large-model-inference-testing/large_model_inference.ipynb @@ -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", @@ -669,7 +669,8 @@ "outputs": [], "source": [ "!pip install locust\n", - "!which locust" + "!which locust\n", + "!pip install matplotlib" ] }, {