From 8d39a2c747cfb49036214352dd831959a02fc173 Mon Sep 17 00:00:00 2001 From: Simon Hughesdon Date: Tue, 15 Aug 2023 11:36:15 +0100 Subject: [PATCH 1/2] Update sagemaker build dependencies To resolve the following error pip when building the sagemaker container: > ERROR: failed to solve There were incompatible versions of some of the dependencies in requirements-freeze.txt. We also noticed that although the requests package was in requirements.txt, it wasn't explicitly referenced by any of the code. It remains in the freeze file as a transitive dependency. We've regenerated the freeze file and have tested this via the Github action. --- ltr/sagemaker/learntorank.Dockerfile | 3 +- ltr/sagemaker/requirements-freeze.txt | 58 ++++++++++++++++----------- ltr/sagemaker/requirements.txt | 1 - 3 files changed, 36 insertions(+), 26 deletions(-) diff --git a/ltr/sagemaker/learntorank.Dockerfile b/ltr/sagemaker/learntorank.Dockerfile index 6269d832a..40fe1c2e4 100644 --- a/ltr/sagemaker/learntorank.Dockerfile +++ b/ltr/sagemaker/learntorank.Dockerfile @@ -2,7 +2,8 @@ FROM public.ecr.aws/docker/library/python:3.11-slim COPY ltr/sagemaker/requirements*.txt . -RUN pip3 install -U --no-cache-dir -r requirements-freeze.txt +RUN python -m pip install --upgrade pip +RUN python -m pip install -U --no-cache-dir -r requirements-freeze.txt COPY ltr/sagemaker/* . diff --git a/ltr/sagemaker/requirements-freeze.txt b/ltr/sagemaker/requirements-freeze.txt index ff69be8a2..a979c9494 100644 --- a/ltr/sagemaker/requirements-freeze.txt +++ b/ltr/sagemaker/requirements-freeze.txt @@ -1,37 +1,47 @@ -awscli==1.27.57 -requests==2.31.0 -sagemaker==2.129.0 +awscli==1.29.24 +sagemaker==2.177.0 ## The following requirements were added by pip freeze: -attrs==22.2.0 -boto3==1.26.57 -botocore==1.29.57 +attrs==23.1.0 +boto3==1.28.24 +botocore==1.31.24 certifi==2023.7.22 -charset-normalizer==3.0.1 +cffi==1.15.1 +charset-normalizer==3.2.0 +cloudpickle==2.2.1 colorama==0.4.4 contextlib2==21.6.0 -dill==0.3.6 +dill==0.3.7 docutils==0.16 google-pasta==0.2.0 idna==3.4 -importlib-metadata==4.13.0 +importlib-metadata==6.8.0 jmespath==1.0.1 -multiprocess==0.70.14 -numpy==1.24.1 -packaging==23.0 -pandas==1.5.3 -pathos==0.3.0 -pox==0.3.2 -ppft==1.7.6.6 -protobuf==3.20.3 -protobuf3-to-dict==0.1.5 -pyasn1==0.4.8 +jsonschema==4.19.0 +jsonschema-specifications==2023.7.1 +multiprocess==0.70.15 +numpy==1.25.2 +packaging==23.1 +pandas==2.0.3 +pathos==0.3.1 +Pillow==10.0.0 +platformdirs==3.10.0 +pox==0.3.3 +ppft==1.7.6.7 +protobuf==4.23.4 +pyasn1==0.5.0 +pycparser==2.21 python-dateutil==2.8.2 -pytz==2022.7.1 -PyYAML==5.4.1 +pytz==2023.3 +PyYAML==6.0.1 +referencing==0.30.2 +requests==2.31.0 +rpds-py==0.9.2 rsa==4.7.2 -s3transfer==0.6.0 +s3transfer==0.6.1 schema==0.7.5 six==1.16.0 smdebug-rulesconfig==1.0.1 -urllib3==1.26.14 -zipp==3.11.0 +tblib==1.7.0 +tzdata==2023.3 +urllib3==1.26.16 +zipp==3.16.2 diff --git a/ltr/sagemaker/requirements.txt b/ltr/sagemaker/requirements.txt index f5126c3c6..4368850dc 100644 --- a/ltr/sagemaker/requirements.txt +++ b/ltr/sagemaker/requirements.txt @@ -1,3 +1,2 @@ awscli -requests sagemaker From e072d5c0887887e9d5abeafdaa3c33546c76d4bb Mon Sep 17 00:00:00 2001 From: Simon Hughesdon Date: Tue, 15 Aug 2023 11:50:56 +0100 Subject: [PATCH 2/2] Bump GH actions to Python 3.10 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5ce908aa..9b5850fc3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.10" - name: Check LTR dependencies install run: | set -ex