From 0acea90b62e5a26519ab476e20c49aa0f3753cbd Mon Sep 17 00:00:00 2001 From: Rohan Narayan Date: Tue, 18 Feb 2025 17:07:50 +0000 Subject: [PATCH 01/19] Update ['dlc_developer_config.toml'] dlc_developer_config.toml: { 'build': { 'build_frameworks': ['huggingface_pytorch'], 'build_inference': True, 'build_training': False}, 'buildspec_override': { 'dlc-pr-huggingface-pytorch-neuronx-inference': 'huggingface/pytorch/inference/buildspec-neuronx.yml'}, 'dev': { 'arm64_mode': False, 'deep_canary_mode': False, 'graviton_mode': False, 'neuronx_mode': True}, 'test': { 'ec2_tests': True, 'ecs_tests': True, 'eks_tests': True, 'sagemaker_local_tests': True, 'sagemaker_remote_tests': True, 'sanity_tests': True, 'security_tests': True}} --- dlc_developer_config.toml | 106 ++++---------------------------------- 1 file changed, 9 insertions(+), 97 deletions(-) diff --git a/dlc_developer_config.toml b/dlc_developer_config.toml index 440ddf1168c5..f8feaab037ee 100644 --- a/dlc_developer_config.toml +++ b/dlc_developer_config.toml @@ -1,162 +1,74 @@ [dev] -# Set to "huggingface", for example, if you are a huggingface developer. Default is "" partner_developer = "" -# Please only set it to true if you are preparing an EI related PR -# Do remember to revert it back to false before merging any PR (including EI dedicated PR) ei_mode = false -# Please only set it to true if you are preparing a NEURON related PR -# Do remember to revert it back to false before merging any PR (including NEURON dedicated PR) neuron_mode = false -# Please only set it to true if you are preparing a NEURONX related PR -# Do remember to revert it back to false before merging any PR (including NEURONX dedicated PR) -neuronx_mode = false -# Please only set it to true if you are preparing a GRAVITON related PR -# Do remember to revert it back to false before merging any PR (including GRAVITON dedicated PR) +neuronx_mode = true graviton_mode = false -# Please only set it to true if you are preparing a ARM64 related PR -# Do remember to revert it back to false before merging any PR (including ARM64 dedicated PR) arm64_mode = false -# Please only set it to True if you are preparing a HABANA related PR -# Do remember to revert it back to False before merging any PR (including HABANA dedicated PR) habana_mode = false -# Please only set it to True if you are preparing a HUGGINGFACE TRCOMP related PR -# Do remember to revert it back to False before merging any PR (including HUGGINGFACE TRCOMP dedicated PR) -# This mode is used to build TF 2.6 and PT1.11 DLC huggingface_trcomp_mode = false -# Please only set it to True if you are preparing a TRCOMP related PR -# Do remember to revert it back to False before merging any PR (including TRCOMP dedicated PR) -# This mode is used to build PT1.12 and above DLC trcomp_mode = false -# Set deep_canary_mode to true to simulate Deep Canary Test conditions on PR for all frameworks in the -# build_frameworks list below. This will cause all image builds and non-deep-canary tests on the PR to be skipped, -# regardless of whether they are enabled or disabled below. -# Set graviton_mode/arm64_mode to true to run Deep Canaries on Graviton/ARM64 images. -# Do remember to revert it back to false before merging any PR. deep_canary_mode = false [build] -# Add in frameworks you would like to build. By default, builds are disabled unless you specify building an image. -# available frameworks - ["autogluon", "huggingface_tensorflow", "huggingface_pytorch", "huggingface_tensorflow_trcomp", "huggingface_pytorch_trcomp", "pytorch_trcomp", "tensorflow", "pytorch", "stabilityai_pytorch"] -build_frameworks = [] - - -# By default we build both training and inference containers. Set true/false values to determine which to build. -build_training = true +build_frameworks = [ "huggingface_pytorch",] +build_training = false build_inference = true - -# Set do_build to "false" to skip builds and test the latest image built by this PR -# Note: at least one build is required to set do_build to "false" do_build = true [notify] -### Notify on test failures -### Off by default notify_test_failures = false - # Valid values: medium or high - notification_severity = "medium" +notification_severity = "medium" [test] -### On by default sanity_tests = true security_tests = true - safety_check_test = false - ecr_scan_allowlist_feature = false +safety_check_test = false +ecr_scan_allowlist_feature = false ecs_tests = true eks_tests = true ec2_tests = true -# Set it to true if you are preparing a Benchmark related PR ec2_benchmark_tests = false - -### Set ec2_tests_on_heavy_instances = true to be able to run any EC2 tests that use large/expensive instance types by -### default. If false, these types of tests will be skipped while other tests will run as usual. -### These tests are run in EC2 test jobs, so ec2_tests must be true if ec2_tests_on_heavy_instances is true. -### Off by default (set to false) ec2_tests_on_heavy_instances = false - -### SM specific tests -### On by default sagemaker_local_tests = true - -# run standard sagemaker remote tests from test/sagemaker_tests sagemaker_remote_tests = true -# run efa sagemaker tests sagemaker_efa_tests = false -# run release_candidate_integration tests sagemaker_rc_tests = false -# run sagemaker benchmark tests sagemaker_benchmark_tests = false - -# SM remote EFA test instance type sagemaker_remote_efa_instance_type = "" - -# Run CI tests for nightly images -# false by default nightly_pr_test_mode = false - use_scheduler = false [buildspec_override] -# Assign the path to the required buildspec file from the deep-learning-containers folder -# For example: -# dlc-pr-tensorflow-2-habana-training = "habana/tensorflow/training/buildspec-2-10.yml" -# dlc-pr-pytorch-inference = "pytorch/inference/buildspec-1-12.yml" -# Setting the buildspec file path to "" allows the image builder to choose the default buildspec file. - -### TRAINING PR JOBS ### - -# Standard Framework Training dlc-pr-pytorch-training = "" dlc-pr-tensorflow-2-training = "" dlc-pr-autogluon-training = "" - -# HuggingFace Training dlc-pr-huggingface-tensorflow-training = "" dlc-pr-huggingface-pytorch-training = "" - -# Training Compiler dlc-pr-huggingface-pytorch-trcomp-training = "" dlc-pr-huggingface-tensorflow-2-trcomp-training = "" dlc-pr-pytorch-trcomp-training = "" - -# Neuron Training dlc-pr-pytorch-neuron-training = "" dlc-pr-tensorflow-2-neuron-training = "" - -# Stability AI Training dlc-pr-stabilityai-pytorch-training = "" - -# Habana Training dlc-pr-pytorch-habana-training = "" dlc-pr-tensorflow-2-habana-training = "" - -### INFERENCE PR JOBS ### - -# Standard Framework Inference dlc-pr-pytorch-inference = "" dlc-pr-tensorflow-2-inference = "" dlc-pr-autogluon-inference = "" - -# Neuron Inference dlc-pr-pytorch-neuron-inference = "" dlc-pr-tensorflow-1-neuron-inference = "" dlc-pr-tensorflow-2-neuron-inference = "" - -# HuggingFace Inference dlc-pr-huggingface-tensorflow-inference = "" dlc-pr-huggingface-pytorch-inference = "" dlc-pr-huggingface-pytorch-neuron-inference = "" - -# Stability AI Inference dlc-pr-stabilityai-pytorch-inference = "" - -# Graviton Inference dlc-pr-pytorch-graviton-inference = "" dlc-pr-tensorflow-2-graviton-inference = "" - -# ARM64 Inference dlc-pr-pytorch-arm64-inference = "" dlc-pr-tensorflow-2-arm64-inference = "" - -# EIA Inference dlc-pr-pytorch-eia-inference = "" dlc-pr-tensorflow-2-eia-inference = "" +# WARNING: Unrecognized key generated below +dlc-pr-huggingface-pytorch-neuronx-inference = "huggingface/pytorch/inference/buildspec-neuronx.yml" + From cc25796127e17d5c9c46457353d75e2ff2ec49e8 Mon Sep 17 00:00:00 2001 From: Rohan Narayan Date: Tue, 18 Feb 2025 17:59:23 +0000 Subject: [PATCH 02/19] Update ['dlc_developer_config.toml'] dlc_developer_config.toml: { 'build': { 'build_frameworks': ['huggingface_pytorch'], 'build_inference': True, 'build_training': False}, 'buildspec_override': { 'dlc-pr-huggingface-pytorch-neuronx-inference': 'huggingface/pytorch/inference/buildspec-neuronx.yml'}, 'dev': { 'arm64_mode': False, 'deep_canary_mode': False, 'graviton_mode': False, 'neuronx_mode': True}, 'test': { 'ec2_tests': True, 'ecs_tests': True, 'eks_tests': True, 'sagemaker_local_tests': True, 'sagemaker_remote_tests': True, 'sanity_tests': True, 'security_tests': True}} From e5fcb5cfd0241104ee7f0a7e2bf0740b0883e3c5 Mon Sep 17 00:00:00 2001 From: Rohan Narayan Date: Tue, 18 Feb 2025 18:00:53 +0000 Subject: [PATCH 03/19] add certifi to apt-get update --- .../inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx | 1 + 1 file changed, 1 insertion(+) diff --git a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx index e672c2d3c1b6..e852b50cbef0 100644 --- a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx +++ b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx @@ -43,6 +43,7 @@ RUN apt-get update \ build-essential \ apt-transport-https \ ca-certificates \ + certifi \ cmake \ curl \ emacs \ From 3a637c066f19e6cdb3b69e14d383803f97844d90 Mon Sep 17 00:00:00 2001 From: Rohan Narayan Date: Tue, 18 Feb 2025 18:08:19 +0000 Subject: [PATCH 04/19] trying pip install --- .../inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx index e852b50cbef0..052e5c692f02 100644 --- a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx +++ b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx @@ -43,7 +43,6 @@ RUN apt-get update \ build-essential \ apt-transport-https \ ca-certificates \ - certifi \ cmake \ curl \ emacs \ @@ -181,7 +180,8 @@ RUN pip install --no-cache-dir \ RUN pip install --no-cache-dir -U \ "pillow>=10.0.1" \ - "requests<2.32.0" + "requests<2.32.0" \ + "certifi" RUN HOME_DIR=/root \ && curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \ From f5c2c38b9c5f14233f5404eda605065075ee247e Mon Sep 17 00:00:00 2001 From: Rohan Narayan Date: Tue, 18 Feb 2025 19:20:45 +0000 Subject: [PATCH 05/19] bump certifi version --- .../inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx index 052e5c692f02..b593f763e410 100644 --- a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx +++ b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx @@ -181,7 +181,7 @@ RUN pip install --no-cache-dir \ RUN pip install --no-cache-dir -U \ "pillow>=10.0.1" \ "requests<2.32.0" \ - "certifi" + "certifi>=2023.7.22" RUN HOME_DIR=/root \ && curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \ From 67bc65288fa191390c4696f159a8758cfb764599 Mon Sep 17 00:00:00 2001 From: Rohan Narayan Date: Tue, 18 Feb 2025 21:09:54 +0000 Subject: [PATCH 06/19] different version of certifi --- .../inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx index b593f763e410..256fd0ebbb1b 100644 --- a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx +++ b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx @@ -181,7 +181,7 @@ RUN pip install --no-cache-dir \ RUN pip install --no-cache-dir -U \ "pillow>=10.0.1" \ "requests<2.32.0" \ - "certifi>=2023.7.22" + "certifi=2023.7.22" RUN HOME_DIR=/root \ && curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \ From 96bdef0ebb4f893cac38b06e2de3c809af899671 Mon Sep 17 00:00:00 2001 From: Rohan Narayan Date: Tue, 18 Feb 2025 21:29:31 +0000 Subject: [PATCH 07/19] fix syntax --- .../inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx index 256fd0ebbb1b..bceff1071b6f 100644 --- a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx +++ b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx @@ -181,7 +181,7 @@ RUN pip install --no-cache-dir \ RUN pip install --no-cache-dir -U \ "pillow>=10.0.1" \ "requests<2.32.0" \ - "certifi=2023.7.22" + "certifi==2023.7.22" RUN HOME_DIR=/root \ && curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \ From 6094af1cd1d7d6d86033b4520b3db329d03769e0 Mon Sep 17 00:00:00 2001 From: Rohan Narayan Date: Tue, 18 Feb 2025 22:38:35 +0000 Subject: [PATCH 08/19] add to requirements as well --- .../inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx | 4 ++-- src/requirements.txt | 1 + test/requirements.txt | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx index bceff1071b6f..73120a22c821 100644 --- a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx +++ b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx @@ -126,7 +126,8 @@ RUN pip install --no-cache-dir -U \ "awscli<2" \ pandas==1.* \ boto3 \ - cryptography + cryptography \ + "certifi==2023.7.22" # Install Neuronx-cc and PyTorch RUN pip install --extra-index-url https://pip.repos.neuron.amazonaws.com \ @@ -181,7 +182,6 @@ RUN pip install --no-cache-dir \ RUN pip install --no-cache-dir -U \ "pillow>=10.0.1" \ "requests<2.32.0" \ - "certifi==2023.7.22" RUN HOME_DIR=/root \ && curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \ diff --git a/src/requirements.txt b/src/requirements.txt index 4b53b70797db..fa95f1284e46 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -11,3 +11,4 @@ black==23.3.0 junit-xml==1.9 toml==0.10.2 retrying +certifi==2023.7.22 diff --git a/test/requirements.txt b/test/requirements.txt index 5b1652f96809..82a7abd83925 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -21,3 +21,4 @@ scrapy crochet tenacity requests +certifi==2023.7.22 From d984335695f05185c14a9560e7d2a7a897f0f376 Mon Sep 17 00:00:00 2001 From: Rohan Narayan Date: Wed, 19 Feb 2025 15:47:33 +0000 Subject: [PATCH 09/19] change certifi installation version --- .../inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx | 2 +- src/requirements.txt | 1 - test/requirements.txt | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx index 73120a22c821..2e5ca7d328e6 100644 --- a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx +++ b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx @@ -127,7 +127,7 @@ RUN pip install --no-cache-dir -U \ pandas==1.* \ boto3 \ cryptography \ - "certifi==2023.7.22" + "certifi>=2023.7.22" # Install Neuronx-cc and PyTorch RUN pip install --extra-index-url https://pip.repos.neuron.amazonaws.com \ diff --git a/src/requirements.txt b/src/requirements.txt index fa95f1284e46..4b53b70797db 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -11,4 +11,3 @@ black==23.3.0 junit-xml==1.9 toml==0.10.2 retrying -certifi==2023.7.22 diff --git a/test/requirements.txt b/test/requirements.txt index 82a7abd83925..62be397a72d8 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -21,4 +21,4 @@ scrapy crochet tenacity requests -certifi==2023.7.22 +certifi>=2023.7.22 From 74320b8552a3faaa44eab40d0c4968c9ef3e0654 Mon Sep 17 00:00:00 2001 From: Rohan Narayan Date: Wed, 19 Feb 2025 15:48:41 +0000 Subject: [PATCH 10/19] fix formatting --- .../inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx | 2 +- test/requirements.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx index 2e5ca7d328e6..a10542034993 100644 --- a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx +++ b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx @@ -181,7 +181,7 @@ RUN pip install --no-cache-dir \ RUN pip install --no-cache-dir -U \ "pillow>=10.0.1" \ - "requests<2.32.0" \ + "requests<2.32.0" RUN HOME_DIR=/root \ && curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \ diff --git a/test/requirements.txt b/test/requirements.txt index 62be397a72d8..5b1652f96809 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -21,4 +21,3 @@ scrapy crochet tenacity requests -certifi>=2023.7.22 From 8d8bf611b0967644b3c7bd48be75766e186adcf5 Mon Sep 17 00:00:00 2001 From: Rohan Narayan Date: Wed, 19 Feb 2025 16:31:31 +0000 Subject: [PATCH 11/19] change requests version --- .../inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx index a10542034993..81fad4cd9a08 100644 --- a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx +++ b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx @@ -126,8 +126,7 @@ RUN pip install --no-cache-dir -U \ "awscli<2" \ pandas==1.* \ boto3 \ - cryptography \ - "certifi>=2023.7.22" + cryptography # Install Neuronx-cc and PyTorch RUN pip install --extra-index-url https://pip.repos.neuron.amazonaws.com \ @@ -181,7 +180,7 @@ RUN pip install --no-cache-dir \ RUN pip install --no-cache-dir -U \ "pillow>=10.0.1" \ - "requests<2.32.0" + "requests==2.32.3" RUN HOME_DIR=/root \ && curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \ From de22a9aece3ae6833e021122bea4a11b69a748ec Mon Sep 17 00:00:00 2001 From: Rohan Narayan Date: Wed, 19 Feb 2025 16:48:30 +0000 Subject: [PATCH 12/19] add certifi to requirements --- .../inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx | 2 +- src/requirements.txt | 1 + test/requirements.txt | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx index 81fad4cd9a08..e672c2d3c1b6 100644 --- a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx +++ b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx @@ -180,7 +180,7 @@ RUN pip install --no-cache-dir \ RUN pip install --no-cache-dir -U \ "pillow>=10.0.1" \ - "requests==2.32.3" + "requests<2.32.0" RUN HOME_DIR=/root \ && curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \ diff --git a/src/requirements.txt b/src/requirements.txt index 4b53b70797db..5447d68fc89f 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -11,3 +11,4 @@ black==23.3.0 junit-xml==1.9 toml==0.10.2 retrying +certifi>=2023.7.22 diff --git a/test/requirements.txt b/test/requirements.txt index 5b1652f96809..62be397a72d8 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -21,3 +21,4 @@ scrapy crochet tenacity requests +certifi>=2023.7.22 From 8ac72da3c5d2e29159b1b57c504993e57111d586 Mon Sep 17 00:00:00 2001 From: Rohan Narayan Date: Wed, 19 Feb 2025 18:05:46 +0000 Subject: [PATCH 13/19] pin version --- src/requirements.txt | 2 +- test/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/requirements.txt b/src/requirements.txt index 5447d68fc89f..fa95f1284e46 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -11,4 +11,4 @@ black==23.3.0 junit-xml==1.9 toml==0.10.2 retrying -certifi>=2023.7.22 +certifi==2023.7.22 diff --git a/test/requirements.txt b/test/requirements.txt index 62be397a72d8..82a7abd83925 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -21,4 +21,4 @@ scrapy crochet tenacity requests -certifi>=2023.7.22 +certifi==2023.7.22 From c6c3245743df2d360220934bde5dfd8835df411c Mon Sep 17 00:00:00 2001 From: Rohan Narayan Date: Wed, 19 Feb 2025 18:59:01 +0000 Subject: [PATCH 14/19] try a new version --- .../inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx | 3 ++- src/requirements.txt | 2 +- test/requirements.txt | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx index e672c2d3c1b6..c13f15631670 100644 --- a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx +++ b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx @@ -180,7 +180,8 @@ RUN pip install --no-cache-dir \ RUN pip install --no-cache-dir -U \ "pillow>=10.0.1" \ - "requests<2.32.0" + "requests<2.32.0" \ + "certifi==2025.1.31" RUN HOME_DIR=/root \ && curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \ diff --git a/src/requirements.txt b/src/requirements.txt index fa95f1284e46..a1ce79ffb892 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -11,4 +11,4 @@ black==23.3.0 junit-xml==1.9 toml==0.10.2 retrying -certifi==2023.7.22 +certifi==2025.1.31 diff --git a/test/requirements.txt b/test/requirements.txt index 82a7abd83925..c3e27c06d36f 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -21,4 +21,4 @@ scrapy crochet tenacity requests -certifi==2023.7.22 +certifi==2025.1.31 From e35c99a0ddcc4f689d7c98ad3aa67ba3ac1b3c60 Mon Sep 17 00:00:00 2001 From: Rohan Narayan Date: Wed, 19 Feb 2025 19:54:34 +0000 Subject: [PATCH 15/19] different way of installing --- .../inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx | 4 +++- src/requirements.txt | 1 - test/requirements.txt | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx index c13f15631670..875a13344c59 100644 --- a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx +++ b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx @@ -117,6 +117,9 @@ RUN conda install -c conda-forge \ enum-compat \ ipython +# Update certifi package +RUN pip install certifi + RUN pip install --no-cache-dir -U \ opencv-python>=4.8.1.78 \ "numpy>=1.22.2, <1.24" \ @@ -181,7 +184,6 @@ RUN pip install --no-cache-dir \ RUN pip install --no-cache-dir -U \ "pillow>=10.0.1" \ "requests<2.32.0" \ - "certifi==2025.1.31" RUN HOME_DIR=/root \ && curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \ diff --git a/src/requirements.txt b/src/requirements.txt index a1ce79ffb892..4b53b70797db 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -11,4 +11,3 @@ black==23.3.0 junit-xml==1.9 toml==0.10.2 retrying -certifi==2025.1.31 diff --git a/test/requirements.txt b/test/requirements.txt index c3e27c06d36f..5b1652f96809 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -21,4 +21,3 @@ scrapy crochet tenacity requests -certifi==2025.1.31 From 2f90ad135fc12449ef1aac64bfdb619be9ea8034 Mon Sep 17 00:00:00 2001 From: Rohan Narayan Date: Wed, 19 Feb 2025 20:12:11 +0000 Subject: [PATCH 16/19] fix formatting --- .../inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx index 875a13344c59..796a1e14d553 100644 --- a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx +++ b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx @@ -183,7 +183,7 @@ RUN pip install --no-cache-dir \ RUN pip install --no-cache-dir -U \ "pillow>=10.0.1" \ - "requests<2.32.0" \ + "requests<2.32.0" RUN HOME_DIR=/root \ && curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \ From 4ecaf68a5746cbcb097fedf590eaf3af4e7ade52 Mon Sep 17 00:00:00 2001 From: Rohan Narayan Date: Wed, 19 Feb 2025 21:41:30 +0000 Subject: [PATCH 17/19] change it to apt-get --- .../inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx index 796a1e14d553..500a1ecaa5fa 100644 --- a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx +++ b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx @@ -63,6 +63,7 @@ RUN apt-get update \ libexpat1 \ libxml2 \ libgstreamer1.0-0 \ + python3-certifi \ && rm -rf /var/lib/apt/lists/* \ && rm -rf /tmp/tmp* \ && apt-get clean @@ -117,9 +118,6 @@ RUN conda install -c conda-forge \ enum-compat \ ipython -# Update certifi package -RUN pip install certifi - RUN pip install --no-cache-dir -U \ opencv-python>=4.8.1.78 \ "numpy>=1.22.2, <1.24" \ From 61a35991d91bf4a80536babce6c6b05fe40fedfb Mon Sep 17 00:00:00 2001 From: Rohan Narayan Date: Wed, 19 Feb 2025 22:38:33 +0000 Subject: [PATCH 18/19] apt and pip --- .../docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx index 500a1ecaa5fa..73d3066fa40e 100644 --- a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx +++ b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx @@ -63,11 +63,16 @@ RUN apt-get update \ libexpat1 \ libxml2 \ libgstreamer1.0-0 \ - python3-certifi \ && rm -rf /var/lib/apt/lists/* \ && rm -rf /tmp/tmp* \ && apt-get clean +RUN apt-get update \ +&& apt-get install -y --only-upgrade python3-certifi \ +&& dpkg -s python3-certifi | grep Version \ +&& apt-get clean \ +&& rm -rf /var/lib/apt/lists/* + RUN echo "deb https://apt.repos.neuron.amazonaws.com focal main" > /etc/apt/sources.list.d/neuron.list RUN wget -qO - https://apt.repos.neuron.amazonaws.com/GPG-PUB-KEY-AMAZON-AWS-NEURON.PUB | apt-key add - @@ -183,6 +188,8 @@ RUN pip install --no-cache-dir -U \ "pillow>=10.0.1" \ "requests<2.32.0" +RUN pip install --no-cache-dir certifi==2025.1.31 + RUN HOME_DIR=/root \ && curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \ && unzip ${HOME_DIR}/oss_compliance.zip -d ${HOME_DIR}/ \ From 484a512db3a241d7cb4f5fffa203bf4a42e1ab07 Mon Sep 17 00:00:00 2001 From: Rohan Narayan Date: Mon, 3 Mar 2025 16:59:13 +0000 Subject: [PATCH 19/19] change order --- .../inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx index 73d3066fa40e..75ed366c4bca 100644 --- a/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx +++ b/huggingface/pytorch/inference/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx @@ -190,6 +190,12 @@ RUN pip install --no-cache-dir -U \ RUN pip install --no-cache-dir certifi==2025.1.31 +RUN apt-get update \ +&& apt-get install -y --only-upgrade python3-certifi \ +&& dpkg -s python3-certifi | grep Version \ +&& apt-get clean \ +&& rm -rf /var/lib/apt/lists/* + RUN HOME_DIR=/root \ && curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \ && unzip ${HOME_DIR}/oss_compliance.zip -d ${HOME_DIR}/ \