From 9af03b225416fe9d38585d1c9a4253976d35b30f Mon Sep 17 00:00:00 2001 From: Sai Parthasarathy Miduthuri <54188298+saimidu@users.noreply.github.com> Date: Tue, 12 Mar 2024 10:42:24 -0700 Subject: [PATCH 1/4] [doc] Add TF 2.14.1 DLCs to available_images (#3765) * [doc] Add TF 2.14.1 DLCs to available_images * Remove TF<=2.11 from prior versions * Remove PT<=1.12 and remaining TF 2.9 DLC --- available_images.md | 100 +++++++++++++------------------------------- 1 file changed, 28 insertions(+), 72 deletions(-) diff --git a/available_images.md b/available_images.md index 14679cdad110..354f587945cc 100644 --- a/available_images.md +++ b/available_images.md @@ -97,31 +97,31 @@ You can pin your version by adding the version tag to your URL as follows: EC2 Framework Containers (Tested on EC2, ECS, and EKS only) ============================ -| Framework |Job Type |Horovod Options|CPU/GPU |Python Version Options | Example URL | -|------------------|-----------|---------------|-----------|-----------------------|--------------------------------------------------------------------------------------------------------| -| PyTorch 2.2.0 |training |No |CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:2.2.0-cpu-py310-ubuntu20.04-ec2 | -| PyTorch 2.2.0 |training |No |GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:2.2.0-gpu-py310-cu121-ubuntu20.04-ec2 | -| PyTorch 2.2.0 |inference |No |CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:2.2.0-cpu-py310-ubuntu20.04-ec2 | -| PyTorch 2.2.0 |inference |No |GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:2.2.0-gpu-py310-cu118-ubuntu20.04-ec2 | -| TensorFlow 2.13.0 |training |No |CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.13.0-cpu-py310-ubuntu20.04-ec2 | -| TensorFlow 2.13.0 |training |No |GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.13.0-gpu-py310-cu118-ubuntu20.04-ec2 | -| TensorFlow 2.13.0 |inference |No |CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.13.0-cpu-py310-ubuntu20.04-ec2 | -| TensorFlow 2.13.0 |inference |No |GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.13.0-gpu-py310-cu118-ubuntu20.04-ec2 | +| Framework |Job Type |Horovod Options|CPU/GPU |Python Version Options | Example URL | +|-------------------|-----------|---------------|-----------|-----------------------|-----------------------------------------------------------------------------------------------------------| +| PyTorch 2.2.0 |training |No |CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:2.2.0-cpu-py310-ubuntu20.04-ec2 | +| PyTorch 2.2.0 |training |No |GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:2.2.0-gpu-py310-cu121-ubuntu20.04-ec2 | +| PyTorch 2.2.0 |inference |No |CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:2.2.0-cpu-py310-ubuntu20.04-ec2 | +| PyTorch 2.2.0 |inference |No |GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:2.2.0-gpu-py310-cu118-ubuntu20.04-ec2 | +| TensorFlow 2.14.1 |training |No |CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.14.1-cpu-py310-ubuntu20.04-ec2 | +| TensorFlow 2.14.1 |training |No |GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.14.1-gpu-py310-cu118-ubuntu20.04-ec2 | +| TensorFlow 2.14.1 |inference |No |CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.14.1-cpu-py310-ubuntu20.04-ec2 | +| TensorFlow 2.14.1 |inference |No |GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.14.1-gpu-py310-cu118-ubuntu20.04-ec2 | SageMaker Framework Containers (SM support only) ============================ -| Framework | Job Type | Horovod Options | CPU/GPU | Python Version Options | Example URL | -|-------------------|-----------|-----------------|-----------|------------------------|---------------------------------------------------------------------------------------------------------------| -| PyTorch 2.2.0 | training | No | CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:2.2.0-cpu-py310-ubuntu20.04-sagemaker | -| PyTorch 2.2.0 | training | No | GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:2.2.0-gpu-py310-cu121-ubuntu20.04-sagemaker | -| PyTorch 2.2.0 | inference | No | CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:2.2.0-cpu-py310-ubuntu20.04-sagemaker | -| PyTorch 2.2.0 | inference | No | GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:2.2.0-gpu-py310-cu118-ubuntu20.04-sagemaker | -| TensorFlow 2.13.0 | training | No | CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.13.0-cpu-py310-ubuntu20.04-sagemaker | -| TensorFlow 2.13.0 | training | No | GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.13.0-gpu-py310-cu118-ubuntu20.04-sagemaker | -| TensorFlow 2.13.0 | inference | No | CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.13.0-cpu-py310-ubuntu20.04-sagemaker | -| TensorFlow 2.13.0 | inference | No | GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.13.0-gpu-py310-cu118-ubuntu20.04-sagemaker | +| Framework | Job Type | Horovod Options | CPU/GPU | Python Version Options | Example URL | +|-------------------|-----------|-----------------|-----------|------------------------|----------------------------------------------------------------------------------------------------------------| +| PyTorch 2.2.0 | training | No | CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:2.2.0-cpu-py310-ubuntu20.04-sagemaker | +| PyTorch 2.2.0 | training | No | GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:2.2.0-gpu-py310-cu121-ubuntu20.04-sagemaker | +| PyTorch 2.2.0 | inference | No | CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:2.2.0-cpu-py310-ubuntu20.04-sagemaker | +| PyTorch 2.2.0 | inference | No | GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:2.2.0-gpu-py310-cu118-ubuntu20.04-sagemaker | +| TensorFlow 2.14.1 | training | No | CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.14.1-cpu-py310-ubuntu20.04-sagemaker | +| TensorFlow 2.14.1 | training | No | GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.14.1-gpu-py310-cu118-ubuntu20.04-sagemaker | +| TensorFlow 2.14.1 | inference | No | CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.14.1-cpu-py310-ubuntu20.04-sagemaker | +| TensorFlow 2.14.1 | inference | No | GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.14.1-gpu-py310-cu118-ubuntu20.04-sagemaker | EC2 Framework Graviton Containers (EC2, ECS, and EKS support only) @@ -307,36 +307,14 @@ Prior EC2 Framework Container Versions | PyTorch 1.13.1 |training |Yes |GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:1.13.1-gpu-py39-cu117-ubuntu20.04-ec2 | | PyTorch 1.13.1 |inference |No |CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:1.13.1-cpu-py39-ubuntu20.04-ec2 | | PyTorch 1.13.1 |inference |No |GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:1.13.1-gpu-py39-cu117-ubuntu20.04-ec2 | -| PyTorch 1.12.1 |training |Yes |CPU | 3.8 (py38) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:1.12.1-cpu-py38-ubuntu20.04-ec2 | -| PyTorch 1.12.1 |training |Yes |GPU | 3.8 (py38) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:1.12.1-gpu-py38-cu116-ubuntu20.04-ec2 | -| PyTorch 1.12.1 |inference |No |CPU | 3.8 (py38) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:1.12.1-cpu-py38-ubuntu20.04-ec2 | -| PyTorch 1.12.1 |inference |No |GPU | 3.8 (py38) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:1.12.1-gpu-py38-cu116-ubuntu20.04-ec2 | -| PyTorch 1.11.0 |training |Yes |CPU | 3.8 (py38) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:1.11.0-cpu-py38-ubuntu20.04-ec2 | -| PyTorch 1.11.0 |training |Yes |GPU | 3.8 (py38) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:1.11.0-gpu-py38-cu115-ubuntu20.04-ec2 | +| TensorFlow 2.13.0 |training |No |CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.13.0-cpu-py310-ubuntu20.04-ec2 | +| TensorFlow 2.13.0 |training |No |GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.13.0-gpu-py310-cu118-ubuntu20.04-ec2 | +| TensorFlow 2.13.0 |inference |No |CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.13.0-cpu-py310-ubuntu20.04-ec2 | +| TensorFlow 2.13.0 |inference |No |GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.13.0-gpu-py310-cu118-ubuntu20.04-ec2 | | TensorFlow 2.12.0 |training |Yes |CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.12.0-cpu-py310-ubuntu20.04-ec2 | | TensorFlow 2.12.0 |training |Yes |GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.12.0-gpu-py310-cu118-ubuntu20.04-ec2 | | TensorFlow 2.12.1 |inference |No |CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.12.1-cpu-py310-ubuntu20.04-ec2 | | TensorFlow 2.12.1 |inference |No |GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.12.1-gpu-py310-cu118-ubuntu20.04-ec2 | -| TensorFlow 2.11.1 |inference |No |CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.11.1-cpu-py39-ubuntu20.04-ec2 | -| TensorFlow 2.11.1 |inference |No |GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.11.1-gpu-py39-cu112-ubuntu20.04-ec2 | -| TensorFlow 2.11.0 |training |Yes |CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.11.0-cpu-py39-ubuntu20.04-ec2 | -| TensorFlow 2.11.0 |training |Yes |GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.11.0-gpu-py39-cu112-ubuntu20.04-ec2 | -| TensorFlow 2.11.0 |inference |No |CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.11.0-cpu-py39-ubuntu20.04-ec2 | -| TensorFlow 2.11.0 |inference |No |GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.11.0-gpu-py39-cu112-ubuntu20.04-ec2 | -| TensorFlow 2.10.1 |inference |No |CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.10.1-cpu-py39-ubuntu20.04-ec2 | -| TensorFlow 2.10.1 |inference |No |GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.10.1-gpu-py39-cu112-ubuntu20.04-ec2 | -| TensorFlow 2.10.0 |training |Yes |CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.10.0-cpu-py39-ubuntu20.04-ec2 | -| TensorFlow 2.10.0 |training |Yes |GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.10.0-gpu-py39-cu112-ubuntu20.04-ec2 | -| TensorFlow 2.10.0 |inference |No |CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.10.0-cpu-py39-ubuntu20.04-ec2 | -| TensorFlow 2.10.0 |inference |No |GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.10.0-gpu-py39-cu112-ubuntu20.04-ec2 | -| TensorFlow 2.9.3 |inference |No |CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.9.3-cpu-py39-ubuntu20.04-ec2 | -| TensorFlow 2.9.3 |inference |No |GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.9.3-gpu-py39-cu112-ubuntu20.04-ec2 | -| TensorFlow 2.9.2 |training |Yes |CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.9.2-cpu-py39-ubuntu20.04-ec2 | -| TensorFlow 2.9.2 |training |Yes |GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.9.2-gpu-py39-cu112-ubuntu20.04-ec2 | -| TensorFlow 2.9.2 |inference |No |CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.9.2-cpu-py39-ubuntu20.04-ec2 | -| TensorFlow 2.9.2 |inference |No |GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.9.2-gpu-py39-cu112-ubuntu20.04-ec2 | -| TensorFlow 2.8.3 |training |Yes |CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.8.3-cpu-py39-ubuntu20.04-ec2 | -| TensorFlow 2.8.3 |training |Yes |GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.8.3-gpu-py39-cu112-ubuntu20.04-ec2 | Prior SageMaker Framework Container Versions ============== @@ -355,34 +333,14 @@ Prior SageMaker Framework Container Versions | PyTorch 1.13.1 | training | Yes | GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:1.13.1-gpu-py39-cu117-ubuntu20.04-sagemaker | | PyTorch 1.13.1 | inference | No | CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:1.13.1-cpu-py39-ubuntu20.04-sagemaker | | PyTorch 1.13.1 | inference | No | GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:1.13.1-gpu-py39-cu117-ubuntu20.04-sagemaker | -| PyTorch 1.12.1 |training | Yes |CPU | 3.8 (py38) |763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:1.12.1-cpu-py38-ubuntu20.04-sagemaker | -| PyTorch 1.12.1 |training | Yes |GPU | 3.8 (py38) |763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:1.12.1-gpu-py38-cu113-ubuntu20.04-sagemaker | -| PyTorch 1.12.1 |inference | No |CPU | 3.8 (py38) |763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:1.12.1-cpu-py38-ubuntu20.04-sagemaker | -| PyTorch 1.12.1 |inference | No |GPU | 3.8 (py38) |763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:1.12.1-gpu-py38-cu113-ubuntu20.04-sagemaker | -| PyTorch 1.11.0 |training | Yes |CPU | 3.8 (py38) |763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:1.11.0-cpu-py38-ubuntu20.04-sagemaker | -| PyTorch 1.11.0 |training | Yes |GPU | 3.8 (py38) |763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:1.11.0-gpu-py38-cu113-ubuntu20.04-sagemaker | +| TensorFlow 2.13.0 | training | No | CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.13.0-cpu-py310-ubuntu20.04-sagemaker | +| TensorFlow 2.13.0 | training | No | GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.13.0-gpu-py310-cu118-ubuntu20.04-sagemaker | +| TensorFlow 2.13.0 | inference | No | CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.13.0-cpu-py310-ubuntu20.04-sagemaker | +| TensorFlow 2.13.0 | inference | No | GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.13.0-gpu-py310-cu118-ubuntu20.04-sagemaker | | TensorFlow 2.12.0 | training | Yes | CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.12.0-cpu-py310-ubuntu20.04-sagemaker | | TensorFlow 2.12.0 | training | Yes | GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.12.0-gpu-py310-cu118-ubuntu20.04-sagemaker | | TensorFlow 2.12.1 | inference | No | CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.12.1-cpu-py310-ubuntu20.04-sagemaker | | TensorFlow 2.12.1 | inference | No | GPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.12.1-gpu-py310-cu118-ubuntu20.04-sagemaker | -| TensorFlow 2.11.0 | training | Yes | CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.11.0-cpu-py39-ubuntu20.04-sagemaker | -| TensorFlow 2.11.0 | training | Yes | GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.11.0-gpu-py39-cu112-ubuntu20.04-sagemaker | -| TensorFlow 2.11.1 | inference | No | CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.11.1-cpu-py39-ubuntu20.04-sagemaker | -| TensorFlow 2.11.1 | inference | No | GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.11.1-gpu-py39-cu112-ubuntu20.04-sagemaker | -| TensorFlow 2.10.1 |training | Yes |CPU | 3.9 (py39) |763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.10.1-cpu-py39-ubuntu20.04-sagemaker | -| TensorFlow 2.10.1 |training | Yes |GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.10.1-gpu-py39-ubuntu20.04-sagemaker | -| TensorFlow 2.10.1 |inference |No |CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.10.1-cpu-py39-ubuntu20.04-sagemaker | -| TensorFlow 2.10.1 |inference |No |GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.10.1-gpu-py39-cu112-ubuntu20.04-sagemaker | -| TensorFlow 2.10.0 |inference |No |CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.10.0-cpu-py39-ubuntu20.04-sagemaker | -| TensorFlow 2.10.0 |inference |No |GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.10.0-gpu-py39-cu112-ubuntu20.04-sagemaker | -| TensorFlow 2.9.3 |inference |No |CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.9.3-cpu-py39-ubuntu20.04-sagemaker | -| TensorFlow 2.9.3 |inference |No |GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.9.3-gpu-py39-cu112-ubuntu20.04-sagemaker | -| TensorFlow 2.9.2 |training |Yes |CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.9.2-cpu-py39-ubuntu20.04-sagemaker | -| TensorFlow 2.9.2 |training |Yes |GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.9.2-gpu-py39-cu112-ubuntu20.04-sagemaker | -| TensorFlow 2.9.2 |inference |No |CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.9.2-cpu-py39-ubuntu20.04-sagemaker | -| TensorFlow 2.9.2 |inference |No |GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference:2.9.2-gpu-py39-cu112-ubuntu20.04-sagemaker | -| TensorFlow 2.8.3 |training |Yes |CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.8.3-cpu-py39-ubuntu20.04-sagemaker | -| TensorFlow 2.8.3 |training |Yes |GPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.8.3-gpu-py39-cu112-ubuntu20.04-sagemaker | Prior EC2 Framework Graviton Containers ============================ @@ -392,7 +350,6 @@ Prior EC2 Framework Graviton Containers |PyTorch 2.0.1 |inference |No |CPU | 3.10 (py310) |763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference-graviton:2.0.1-cpu-py310-ubuntu20.04-ec2 | |PyTorch 1.12.1 |inference |No |CPU | 3.8 (py38) |763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference-graviton:1.12.1-cpu-py38-ubuntu20.04-ec2 | |TensorFlow 2.12.1 |inference |No |CPU | 3.10 (py310) |763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference-graviton:2.12.1-cpu-py310-ubuntu20.04-ec2 | -|TensorFlow 2.9.1 |inference |No |CPU | 3.8 (py38) |763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference-graviton:2.9.1-cpu-py38-ubuntu20.04-ec2 | Prior SageMaker Framework Graviton Containers ============================ @@ -401,7 +358,6 @@ Prior SageMaker Framework Graviton Containers | PyTorch 2.0.1 | inference | No | CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference-graviton:2.0.1-cpu-py310-ubuntu20.04-sagemaker | | PyTorch 1.12.1 | inference | No | CPU | 3.8 (py38) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference-graviton:1.12.1-cpu-py38-ubuntu20.04-sagemaker | | TensorFlow 2.12.1 | inference | No | CPU | 3.10 (py310) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference-graviton:2.12.1-cpu-py310-ubuntu20.04-sagemaker | -| TensorFlow 2.9.1 | inference | No | CPU | 3.9 (py39) | 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-inference-graviton:2.9.1-cpu-py38-ubuntu20.04-sagemaker | Prior AutoGluon Training Containers =============================== From 5e1b1ee468c3013f81f63816a58778084ae41218 Mon Sep 17 00:00:00 2001 From: arjkesh <33526713+arjkesh@users.noreply.github.com> Date: Tue, 12 Mar 2024 11:55:32 -0700 Subject: [PATCH 2/4] Add PT 2.2 EC2 inference images to release yaml (#3766) * update * Update release_images_inference.yml --- release_images_inference.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/release_images_inference.yml b/release_images_inference.yml index 2b91b288acd0..369326004a0e 100644 --- a/release_images_inference.yml +++ b/release_images_inference.yml @@ -209,3 +209,16 @@ release_images: example: False disable_sm_tag: False force_release: False + 17: + framework: "pytorch" + version: "2.2.0" + arch_type: "x86" + customer_type: "ec2" + inference: + device_types: [ "cpu", "gpu" ] + python_versions: [ "py310" ] + os_version: "ubuntu20.04" + cuda_version: "cu118" + example: False + disable_sm_tag: False + force_release: False From b17f44dd7e7ac12802eeec299f6d7c72ff62d319 Mon Sep 17 00:00:00 2001 From: arjkesh <33526713+arjkesh@users.noreply.github.com> Date: Tue, 12 Mar 2024 17:32:55 -0700 Subject: [PATCH 3/4] Allow build override in PR from existing image (#3735) --- pytorch/training/buildspec.yml | 2 ++ src/config.py | 9 ++--- src/image.py | 1 + src/image_builder.py | 36 +++++++++++++++---- .../sanity/quick_checks/test_buildspecs.py | 14 ++++++-- 5 files changed, 47 insertions(+), 15 deletions(-) diff --git a/pytorch/training/buildspec.yml b/pytorch/training/buildspec.yml index a00eb5651091..fbb752ec4cfe 100644 --- a/pytorch/training/buildspec.yml +++ b/pytorch/training/buildspec.yml @@ -44,6 +44,7 @@ images: latest_release_tag: !join [ *VERSION, "-", *DEVICE_TYPE, "-", *TAG_PYTHON_VERSION, "-", *OS_VERSION, "-sagemaker" ] docker_file: !join [ docker/, *SHORT_VERSION, /, *DOCKER_PYTHON_VERSION, /Dockerfile., *DEVICE_TYPE ] target: sagemaker + # build_tag_override: "beta:2.2.0-cpu-py310-ubuntu20.04-sagemaker" context: <<: *TRAINING_CONTEXT BuildSageMakerGPUPTTrainPy3DockerImage: @@ -60,5 +61,6 @@ images: docker_file: !join [ docker/, *SHORT_VERSION, /, *DOCKER_PYTHON_VERSION, /, *CUDA_VERSION, /Dockerfile., *DEVICE_TYPE ] target: sagemaker + # build_tag_override: "beta:2.2.0-gpu-py310-cu121-ubuntu20.04-sagemaker" context: <<: *TRAINING_CONTEXT diff --git a/src/config.py b/src/config.py index e766a7b58a8a..94dd9ff61354 100644 --- a/src/config.py +++ b/src/config.py @@ -56,16 +56,13 @@ def is_autopatch_build_enabled_in_image_buildspec(buildspec_path=None): image_buildspec_object = Buildspec() image_buildspec_object.load(buildspec_path) autopatch_build_flag = image_buildspec_object.get("autopatch_build", "False").lower() == "true" - print(f"Here: {buildspec_path}") return autopatch_build_flag def is_autopatch_build_enabled(buildspec_path=None): - return ( - parse_dlc_developer_configs("build", "autopatch_build") - or os.getenv("AUTOPATCH") - or is_autopatch_build_enabled_in_image_buildspec(buildspec_path=buildspec_path) - ) + return parse_dlc_developer_configs( + "build", "autopatch_build" + ) or is_autopatch_build_enabled_in_image_buildspec(buildspec_path=buildspec_path) def is_ec2_test_enabled(): diff --git a/src/image.py b/src/image.py index 63a34f97c573..70f0385e9fe5 100644 --- a/src/image.py +++ b/src/image.py @@ -192,6 +192,7 @@ def docker_build(self, fileobj=None, custom_context=False): :return: int, Build Status """ response = [f"Starting the Build Process for {self.repository}:{self.tag}"] + for line in self.client.build( fileobj=fileobj, path=self.dockerfile, diff --git a/src/image_builder.py b/src/image_builder.py index fd5df3a6a67a..b2403cd3511c 100644 --- a/src/image_builder.py +++ b/src/image_builder.py @@ -18,6 +18,7 @@ import os import re import json +import tempfile from copy import deepcopy @@ -140,10 +141,7 @@ def image_builder(buildspec, image_types=[], device_types=[]): if is_nightly_build_context(): additional_image_tags.append(tag_image_with_date(image_tag)) - if build_context != "PR": - image_tag = tag_image_with_datetime(image_tag) - # If build is not enabled, we don't care about the datetime tag - elif is_build_enabled(): + if is_build_enabled() or build_context != "PR": # Order appears to matter in datetime tagging, so tag with no datetime first, then # set image_tag to have datetime no_datetime = image_tag @@ -211,10 +209,34 @@ def image_builder(buildspec, image_types=[], device_types=[]): if inference_toolkit_version: extra_build_args["SM_TOOLKIT_VERSION"] = inference_toolkit_version + tag_override = image_config.get("build_tag_override") + dockerfile = image_config["docker_file"] + target = image_config.get("target") + tag_override_regex = r"^(beta|pr):\S+$" + if tag_override and build_context == "PR": + if is_autopatch_build_enabled(buildspec_path=buildspec): + FORMATTER.print("AUTOPATCH ENABLED IN BUILDSPEC, CANNOT OVERRIDE WITH TAG, SORRY!") + elif not re.match(tag_override_regex, tag_override): + FORMATTER.print( + f"TAG OVERRIDE MUST BE OF FORMAT {tag_override_regex}, but got {tag_override}. Proceeding with regular build." + ) + else: + repo_override, t_override = tag_override.split(":") + with tempfile.NamedTemporaryFile(mode="w", delete=False) as temp_file_handle: + source_uri = ( + f"{image_repo_uri.replace('pr-', f'{repo_override}-')}:{t_override}" + ) + temp_file_handle.write( + f"FROM {source_uri}\nLABEL dlc.dev.source_uri={source_uri}" + ) + dockerfile = temp_file_handle.name + target = None + FORMATTER.print(f"USING TAG OVERRIDE {source_uri}") + ARTIFACTS.update( { "dockerfile": { - "source": image_config["docker_file"], + "source": dockerfile, "target": "Dockerfile", } } @@ -308,14 +330,14 @@ def image_builder(buildspec, image_types=[], device_types=[]): # Create pre_push stage docker object pre_push_stage_image_object = DockerImage( info=info, - dockerfile=image_config["docker_file"], + dockerfile=dockerfile, repository=image_repo_uri, tag=append_tag(image_tag, "pre-push"), to_build=image_config["build"], stage=constants.PRE_PUSH_STAGE, context=context, additional_tags=additional_image_tags, - target=image_config.get("target"), + target=target, ) ##### Create Common stage docker object ##### diff --git a/test/dlc_tests/sanity/quick_checks/test_buildspecs.py b/test/dlc_tests/sanity/quick_checks/test_buildspecs.py index ec0b48e37e02..6d046a8a1144 100644 --- a/test/dlc_tests/sanity/quick_checks/test_buildspecs.py +++ b/test/dlc_tests/sanity/quick_checks/test_buildspecs.py @@ -37,25 +37,35 @@ def test_train_inference_buildspec(): # Don't look for framework buildspecs in the top level directory - these are not framework buildspecs if os.path.split(buildspec_path)[0] != dlc_base_dir: - _assert_single_image_type_buildspec( + _assert_single_image_type_no_tag_override_buildspec( buildspec_path, inference_pattern, training_pattern ) -def _assert_single_image_type_buildspec(buildspec_path, inference_pattern, training_pattern): +def _assert_single_image_type_no_tag_override_buildspec( + buildspec_path, inference_pattern, training_pattern +): """ Isolate condition for checking whether an buildspec is consistent with its image type (training or inference). + Also check to make sure we don't have any build tag overrides in there. Require that images are nested under training or inference, if not, raise error. """ + build_tag_override_regex = re.compile(r"^\s*build_tag_override:\s\S*") if "training" in buildspec_path: with open(buildspec_path) as trn_buildspec_handle: for line in trn_buildspec_handle: + assert not build_tag_override_regex.search( + line + ), f"Found valid build_tag_overrides in {buildspec_path} - please remove before merge." assert not inference_pattern.search( line ), f"Found inference reference in training buildspec {buildspec_path}. Please check the file and remove them." elif "inference" in buildspec_path: with open(buildspec_path) as inf_buildspec_handle: for line in inf_buildspec_handle: + assert not build_tag_override_regex.search( + line + ), f"Found valid build_tag_overrides in {buildspec_path} - please remove before merge." assert not training_pattern.search( line ), f"Found training reference in inference buildspec {buildspec_path}. Please check the file and remove them." From d6374f4708355a3d539b4bc25a70fb237b9452be Mon Sep 17 00:00:00 2001 From: Shantanu Tripathi Date: Wed, 13 Mar 2024 12:27:21 -0700 Subject: [PATCH 4/4] [Build][Test] Handle cases for ECR Scanning tests (#3754) * Handle cases for ECR Scanning tests * Add logger data * Reduce patch threshold to Undefined * Refactor to make more understandable * Reformatting * revert temp changes --- src/patch_helper.py | 2 +- test/dlc_tests/sanity/test_ecr_scan.py | 19 +++++++++++++++---- test/test_utils/security.py | 6 ++++-- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/patch_helper.py b/src/patch_helper.py index 64ef2d6767ec..7d877768e364 100644 --- a/src/patch_helper.py +++ b/src/patch_helper.py @@ -84,7 +84,7 @@ def get_impacted_os_packages(image_uri, python_version=None): ) = helper_function_for_leftover_vulnerabilities_from_enhanced_scanning( image_uri, python_version=python_version, - minimum_sev_threshold="LOW", + minimum_sev_threshold="UNDEFINED", allowlist_removal_enabled=False, ) impacted_packages = set() diff --git a/test/dlc_tests/sanity/test_ecr_scan.py b/test/dlc_tests/sanity/test_ecr_scan.py index 21db8c072015..f6a3854d5f81 100644 --- a/test/dlc_tests/sanity/test_ecr_scan.py +++ b/test/dlc_tests/sanity/test_ecr_scan.py @@ -221,10 +221,18 @@ def helper_function_for_leftover_vulnerabilities_from_enhanced_scanning( remaining_vulnerabilities = ecr_image_vulnerability_list - image_scan_allowlist LOGGER.info(f"ECR Enhanced Scanning test completed for image: {image}") - if remove_non_patchable_vulns and remaining_vulnerabilities: - non_patchable_vulnerabilities = extract_non_patchable_vulnerabilities( - remaining_vulnerabilities, ecr_enhanced_repo_uri + if remove_non_patchable_vulns: + non_patchable_vulnerabilities = ECREnhancedScanVulnerabilityList( + minimum_severity=CVESeverity[minimum_sev_threshold] ) + + ## non_patchable_vulnerabilities is a subset of remaining_vulnerabilities that cannot be patched. + ## Thus, if remaining_vulnerabilities exists, we need to find the non_patchable_vulnerabilities from it. + if remaining_vulnerabilities: + non_patchable_vulnerabilities = extract_non_patchable_vulnerabilities( + remaining_vulnerabilities, ecr_enhanced_repo_uri + ) + future_allowlist = generate_future_allowlist( ecr_image_vulnerability_list=ecr_image_vulnerability_list, image_scan_allowlist=image_scan_allowlist, @@ -254,7 +262,10 @@ def helper_function_for_leftover_vulnerabilities_from_enhanced_scanning( s3_filepath=future_allowlist_upload_path, tag_set=upload_tag_set, ) - remaining_vulnerabilities = remaining_vulnerabilities - non_patchable_vulnerabilities + + if remaining_vulnerabilities: + remaining_vulnerabilities = remaining_vulnerabilities - non_patchable_vulnerabilities + LOGGER.info( f"[FutureAllowlist][image_uri:{ecr_enhanced_repo_uri}] {json.dumps(future_allowlist.vulnerability_list, cls= test_utils.EnhancedJSONEncoder)}" ) diff --git a/test/test_utils/security.py b/test/test_utils/security.py index b15dac9e8a33..3ad12f9b6dd6 100644 --- a/test/test_utils/security.py +++ b/test/test_utils/security.py @@ -382,7 +382,7 @@ def __sub__(self, other): if not self.vulnerability_list: return None if not other or not other.vulnerability_list: - return self + return copy.deepcopy(self) missing_vulnerabilities = [ vulnerability @@ -407,7 +407,9 @@ def __add__(self, other): :return: Union of vulnerabilites exisiting in self and other """ flattened_vulnerability_list_self = self.get_flattened_vulnerability_list() - flattened_vulnerability_list_other = other.get_flattened_vulnerability_list() + flattened_vulnerability_list_other = ( + other.get_flattened_vulnerability_list() if other else [] + ) all_vulnerabilities = flattened_vulnerability_list_self + flattened_vulnerability_list_other if not all_vulnerabilities: return None