{ "cells": [ { "cell_type": "markdown", "id": "7b12cc31-daeb-48c6-88ad-3c1ec76da1a4", "metadata": {}, "source": [ "## Use this file to compile the Stable Diffusion model using the AITemplate \n" ] }, { "cell_type": "markdown", "id": "56b607b8", "metadata": {}, "source": [ "---\n", "\n", "This notebook's CI test result for us-west-2 is as follows. CI test results in other regions can be found at the end of the notebook. \n", "\n", "![This us-west-2 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/us-west-2/inference|generativeai|optimizations|aitemplate|download_weights.ipynb)\n", "\n", "---" ] }, { "cell_type": "markdown", "id": "2859b00e", "metadata": {}, "source": [ "\n", "Alternately you can follow the method from AItemplate documented here at https://github.com/facebookincubator/AITemplate under the section docker install\n", "\n", "This below section uses the same technique except that it uses the DJL container to compile the model and so we do not need to create or download any other docker image. However this file assumes you have ECR login permissions to pull the DJL container image" ] }, { "cell_type": "markdown", "id": "f9438ec0-3f16-4035-884f-9c353cce4b47", "metadata": {}, "source": [ "### Docker change data directory\n", "\n", "This is needed to ensure docker can utilize the mounted EBS volume" ] }, { "cell_type": "raw", "id": "80643836-df7c-4534-9601-30a5b004caea", "metadata": { "tags": [] }, "source": [ "!ls -alrt /var/lib/docker" ] }, { "cell_type": "raw", "id": "bfaa69ec-caad-4998-97fb-1ab903b84e49", "metadata": { "tags": [] }, "source": [ "%%sh\n", "#!/bin/bash\n", "\n", "rm -rf /home/ec2-user/SageMaker/docker_data_ait\n", "\n", "sudo service docker stop\n", "\n", "sudo mv /var/lib/docker /home/ec2-user/SageMaker/docker_data_ait\n", "\n", "\n", "sudo ln -s /home/ec2-user/SageMaker/docker_data_ait /var/lib/docker\n", "\n", "ls -alrt /var/lib/docker\n", "\n", "sudo service docker start" ] }, { "cell_type": "markdown", "id": "9711f871-b2d0-4f6a-be7e-050a9ce5119e", "metadata": {}, "source": [ "### Clone the AITemplate \n", "\n", "under /home/ec2-user/SageMaker/compiled_ai_repo\n", "\n", "\n", "we will need to install GIT LFS needed to clone the repo. If you have the LFS installed already then run the git clone recursive command only" ] }, { "cell_type": "raw", "id": "fe6af2dd-d559-40f0-a06b-690dd531e97b", "metadata": { "tags": [] }, "source": [ "%%sh\n", "\n", "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash\n", "\n", "sudo yum install git-lfs\n", "\n", "git lfs install\n", "\n", "mkdir -p /home/ec2-user/SageMaker/compiled_ai_repo/\n", "cd /home/ec2-user/SageMaker/compiled_ai_repo/\n", "git clone https://github.com/lanking520/AITemplate --recursive\n", "\n" ] }, { "cell_type": "markdown", "id": "ded979b8-c55f-40af-994e-1b5b7e8787d5", "metadata": {}, "source": [ "### Over write the download file to remove the token \n" ] }, { "cell_type": "raw", "id": "5581bf6f-e079-45ca-b58c-b3dc8a09ba70", "metadata": { "tags": [] }, "source": [ "%%writefile /home/ec2-user/SageMaker/compiled_ai_repo/AITemplate/examples/05_stable_diffusion/scripts/download_pipeline.py\n", "# Copyright (c) Meta Platforms, Inc. and affiliates.\n", "#\n", "# Licensed under the Apache License, Version 2.0 (the \"License\");\n", "# you may not use this file except in compliance with the License.\n", "# You may obtain a copy of the License at\n", "#\n", "# http://www.apache.org/licenses/LICENSE-2.0\n", "#\n", "# Unless required by applicable law or agreed to in writing, software\n", "# distributed under the License is distributed on an \"AS IS\" BASIS,\n", "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", "# See the License for the specific language governing permissions and\n", "# limitations under the License.\n", "#\n", "import click\n", "import torch\n", "from diffusers import StableDiffusionPipeline\n", "\n", "\n", "@click.command()\n", "@click.option(\"--token\", default=\"\", help=\"access token\")\n", "@click.option(\n", " \"--save_directory\",\n", " default=\"./tmp/diffusers-pipeline/stabilityai/stable-diffusion-v2\",\n", " help=\"pipeline files local directory\",\n", ")\n", "def download_pipeline_files(token, save_directory) -> None:\n", " StableDiffusionPipeline.from_pretrained(\n", " \"stabilityai/stable-diffusion-2-1-base\",\n", " revision=\"fp16\",\n", " torch_dtype=torch.float16,\n", " ).save_pretrained(save_directory)\n", "\n", "\n", "if __name__ == \"__main__\":\n", " download_pipeline_files()" ] }, { "cell_type": "markdown", "id": "894b603e-c5cf-43ef-a79b-a48332ef68d1", "metadata": {}, "source": [ "### Build and install docker image AITemplate with DJL container \n", "\n", "we wil use the DJL container to compile the weights" ] }, { "cell_type": "raw", "id": "ff26e557-c529-467e-ac41-6953de93f290", "metadata": { "tags": [] }, "source": [ "%%sh\n", "\n", "# Get the region defined in the current configuration (default to us-east-1 if none defined)\n", "region=$(aws configure get region)\n", "region=${region:-us-east-1}\n", "\n", "\n", "\n", "djl_image_uri=\"763104351884.dkr.ecr.${region}.amazonaws.com/djl-inference:0.21.0-deepspeed0.8.0-cu117\"\n", "login_img_uri=763104351884.dkr.ecr.${region}.amazonaws.com\n", "\n", "echo $region\n", "echo $djl_image_uri\n", "echo $inference_image_uri\n", "echo \"image to used for compilations is $djl_image_uri\"\n", "\n", "aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $login_img_uri\n", "\n", "docker pull $djl_image_uri\n", "\n", "docker tag $djl_image_uri djl-ait-sd\n", "\n", "docker images # this should list djl-ait-sd which can be used to login into and use as below \n", "\n" ] }, { "cell_type": "markdown", "id": "d666c591-dc2e-45b2-98da-3994930c598f", "metadata": {}, "source": [ "### Now compile and create the AIT weights" ] }, { "cell_type": "markdown", "id": "71566add-740a-4a73-abc9-be2626adf614", "metadata": {}, "source": [ "#### To compile the weights " ] }, { "cell_type": "raw", "id": "0ccfb058-63f6-4052-a5b8-667779dcb59e", "metadata": { "tags": [] }, "source": [ "%%sh\n", "\n", "cd /home/ec2-user/SageMaker/compiled_ai_repo\n", "sudo rm -rf tmp\n", "\n", "# to delete any previous weights\n", "cd /home/ec2-user/SageMaker/default_ai_repo/AITemplate/examples/05_stable_diffusion/scripts\n", "sudo rm -rf tmp\n", "\n" ] }, { "cell_type": "raw", "id": "c7adb4b9-c9e1-40ed-9428-a2b161f215f4", "metadata": { "tags": [] }, "source": [ "%%writefile /home/ec2-user/SageMaker/compiled_ai_repo/generate_weights.sh\n", "\n", "pip3 install click\n", "cd /model_repository/AITemplate/examples/05_stable_diffusion/scripts \n", "\n", "# Compile models\n", "# -- this downloads and saves as diffusers-pipeline/ under /model_repository/AITemplate/examples/05_stable_diffusion/scripts/tmp\n", "# - this gets mapped too -- /home/ec2-user/SageMaker/compiled_ai_repo/AITemplate/examples/05_stable_diffusion/scripts/tmp\n", "python3 download_pipeline.py\n", "\n", "# - that is why --local-dir\",default=\"./tmp/diffusers-pipeline/stabilityai/stable-diffusion-v2\" -- works\n", "# -- And all the weights are correctly under the ./tmp folder --\n", "# -- which is mapped too -- /home/ec2-user/SageMaker/default_ai_repo/AITemplate/examples/05_stable_diffusion/scripts/tmp\n", "python3 compile.py --local-dir ./tmp/diffusers-pipeline/stabilityai/stable-diffusion-v2 \n", "\n", "# -- use this if we were to GIT clone and use that instead -- but this creates a huge model weights size\n", "# python3 compile.py --local-dir /model_repository/stable-diffusion-2-1/\n" ] }, { "cell_type": "raw", "id": "d721cd9b-715b-4921-a670-336711923df6", "metadata": { "tags": [] }, "source": [ "%%sh\n", "\n", "# for DJL container -- use this\n", "\n", "cd /home/ec2-user/SageMaker/compiled_ai_repo\n", "\n", "docker run --gpus=all --shm-size=4G --rm -p8000:8000 -p8001:8001 -p8002:8002 -v$(pwd):/model_repository djl-ait-sd /bin/bash /model_repository/generate_weights.sh" ] }, { "cell_type": "markdown", "id": "fb9f9eb5-aba1-458f-a07f-50760d26607f", "metadata": {}, "source": [ "### Copy the weights to S3 location\n", "\n", "old weights saved under s3://sagemaker-us-east-1-425576326687/raw_weights/stabilityai_working/aitemplate_g5/" ] }, { "cell_type": "raw", "id": "ec6ff77a-6c46-4a11-99bc-a9506be55577", "metadata": { "tags": [] }, "source": [ "%%sh\n", "\n", "ls -alrt /home/ec2-user/SageMaker/compiled_ai_repo/AITemplate/examples/05_stable_diffusion/scripts/tmp\n", "\n", "cd /home/ec2-user/SageMaker/compiled_ai_repo/AITemplate/examples/05_stable_diffusion/scripts/tmp\n", "\n", "# Get the region defined in the current configuration (default to us-east-1 if none defined)\n", "region=$(aws configure get region)\n", "region=${region:-us-east-1}\n", "\n", "account=$(aws sts get-caller-identity --query \"Account\" --output text)\n", "\n", "echo $account\n", "echo $region\n", "\n", "aws s3 rm s3://sagemaker-${region}-${account}/raw_weights/stabilityai/aitemplate_g5/ --recursive\n", "aws s3 cp . s3://sagemaker-${region}-${account}/raw_weights/stabilityai/aitemplate_g5/ --recursive \n", "\n", "aws s3 ls s3://sagemaker-${region}-${account}/raw_weights/stabilityai/aitemplate_g5/" ] }, { "cell_type": "code", "execution_count": null, "id": "71cb043e-e3ed-4a55-a784-917bea54e595", "metadata": { "tags": [] }, "outputs": [], "source": [ "print(\" please check your S3 location to ensure the weights have been copied to your S3\")" ] }, { "cell_type": "markdown", "id": "73363b26", "metadata": {}, "source": [ "## Notebook CI Test Results\n", "\n", "This notebook was tested in multiple regions. The test results are as follows, except for us-west-2 which is shown at the top of the notebook.\n", "\n", "![This us-east-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/us-east-1/inference|generativeai|optimizations|aitemplate|download_weights.ipynb)\n", "\n", "![This us-east-2 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/us-east-2/inference|generativeai|optimizations|aitemplate|download_weights.ipynb)\n", "\n", "![This us-west-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/us-west-1/inference|generativeai|optimizations|aitemplate|download_weights.ipynb)\n", "\n", "![This ca-central-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/ca-central-1/inference|generativeai|optimizations|aitemplate|download_weights.ipynb)\n", "\n", "![This sa-east-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/sa-east-1/inference|generativeai|optimizations|aitemplate|download_weights.ipynb)\n", "\n", "![This eu-west-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/eu-west-1/inference|generativeai|optimizations|aitemplate|download_weights.ipynb)\n", "\n", "![This eu-west-2 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/eu-west-2/inference|generativeai|optimizations|aitemplate|download_weights.ipynb)\n", "\n", "![This eu-west-3 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/eu-west-3/inference|generativeai|optimizations|aitemplate|download_weights.ipynb)\n", "\n", "![This eu-central-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/eu-central-1/inference|generativeai|optimizations|aitemplate|download_weights.ipynb)\n", "\n", "![This eu-north-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/eu-north-1/inference|generativeai|optimizations|aitemplate|download_weights.ipynb)\n", "\n", "![This ap-southeast-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/ap-southeast-1/inference|generativeai|optimizations|aitemplate|download_weights.ipynb)\n", "\n", "![This ap-southeast-2 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/ap-southeast-2/inference|generativeai|optimizations|aitemplate|download_weights.ipynb)\n", "\n", "![This ap-northeast-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/ap-northeast-1/inference|generativeai|optimizations|aitemplate|download_weights.ipynb)\n", "\n", "![This ap-northeast-2 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/ap-northeast-2/inference|generativeai|optimizations|aitemplate|download_weights.ipynb)\n", "\n", "![This ap-south-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/ap-south-1/inference|generativeai|optimizations|aitemplate|download_weights.ipynb)\n" ] } ], "metadata": { "availableInstances": [ { "_defaultOrder": 0, "_isFastLaunch": true, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 4, "name": "ml.t3.medium", "vcpuNum": 2 }, { "_defaultOrder": 1, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 8, "name": "ml.t3.large", "vcpuNum": 2 }, { "_defaultOrder": 2, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 16, "name": "ml.t3.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 3, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 32, "name": "ml.t3.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 4, "_isFastLaunch": true, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 8, "name": "ml.m5.large", "vcpuNum": 2 }, { "_defaultOrder": 5, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 16, "name": "ml.m5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 6, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 32, "name": "ml.m5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 7, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 64, "name": "ml.m5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 8, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 128, "name": "ml.m5.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 9, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 192, "name": "ml.m5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 10, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 256, "name": "ml.m5.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 11, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 384, "name": "ml.m5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 12, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 8, "name": "ml.m5d.large", "vcpuNum": 2 }, { "_defaultOrder": 13, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 16, "name": "ml.m5d.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 14, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 32, "name": "ml.m5d.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 15, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 64, "name": "ml.m5d.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 16, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 128, "name": "ml.m5d.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 17, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 192, "name": "ml.m5d.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 18, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 256, "name": "ml.m5d.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 19, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 384, "name": "ml.m5d.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 20, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": true, "memoryGiB": 0, "name": "ml.geospatial.interactive", "supportedImageNames": [ "sagemaker-geospatial-v1-0" ], "vcpuNum": 0 }, { "_defaultOrder": 21, "_isFastLaunch": true, "category": "Compute optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 4, "name": "ml.c5.large", "vcpuNum": 2 }, { "_defaultOrder": 22, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 8, "name": "ml.c5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 23, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 16, "name": "ml.c5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 24, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 32, "name": "ml.c5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 25, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 72, "name": "ml.c5.9xlarge", "vcpuNum": 36 }, { "_defaultOrder": 26, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 96, "name": "ml.c5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 27, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 144, "name": "ml.c5.18xlarge", "vcpuNum": 72 }, { "_defaultOrder": 28, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 192, "name": "ml.c5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 29, "_isFastLaunch": true, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 16, "name": "ml.g4dn.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 30, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 32, "name": "ml.g4dn.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 31, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 64, "name": "ml.g4dn.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 32, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 128, "name": "ml.g4dn.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 33, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "hideHardwareSpecs": false, "memoryGiB": 192, "name": "ml.g4dn.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 34, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 256, "name": "ml.g4dn.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 35, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 61, "name": "ml.p3.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 36, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "hideHardwareSpecs": false, "memoryGiB": 244, "name": "ml.p3.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 37, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 8, "hideHardwareSpecs": false, "memoryGiB": 488, "name": "ml.p3.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 38, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 8, "hideHardwareSpecs": false, "memoryGiB": 768, "name": "ml.p3dn.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 39, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 16, "name": "ml.r5.large", "vcpuNum": 2 }, { "_defaultOrder": 40, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 32, "name": "ml.r5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 41, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 64, "name": "ml.r5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 42, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 128, "name": "ml.r5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 43, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 256, "name": "ml.r5.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 44, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 384, "name": "ml.r5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 45, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 512, "name": "ml.r5.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 46, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 768, "name": "ml.r5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 47, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 16, "name": "ml.g5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 48, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 32, "name": "ml.g5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 49, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 64, "name": "ml.g5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 50, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 128, "name": "ml.g5.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 51, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 256, "name": "ml.g5.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 52, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "hideHardwareSpecs": false, "memoryGiB": 192, "name": "ml.g5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 53, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "hideHardwareSpecs": false, "memoryGiB": 384, "name": "ml.g5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 54, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 8, "hideHardwareSpecs": false, "memoryGiB": 768, "name": "ml.g5.48xlarge", "vcpuNum": 192 }, { "_defaultOrder": 55, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 8, "hideHardwareSpecs": false, "memoryGiB": 1152, "name": "ml.p4d.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 56, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 8, "hideHardwareSpecs": false, "memoryGiB": 1152, "name": "ml.p4de.24xlarge", "vcpuNum": 96 } ], "kernelspec": { "display_name": "Python 3 (Data Science 3.0)", "language": "python", "name": "python3__SAGEMAKER_INTERNAL__arn:aws:sagemaker:us-west-2:236514542706:image/sagemaker-data-science-310-v1" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.6" } }, "nbformat": 4, "nbformat_minor": 5 }