From 5085dd887b1c7d77e9c5c49390bf43bcba470be4 Mon Sep 17 00:00:00 2001 From: Mark Bunday Date: Wed, 1 Jun 2022 17:57:57 -0400 Subject: [PATCH] Upgrade Python version from 3.8 to 3.10 --- ci/buildspec.yml | 2 +- ci/buildspec_amd64.yml | 2 +- ci/buildspec_arm.yml | 2 +- ci/buildspec_multiarch.yml | 2 +- docker/1.5-1/base/Dockerfile.cpu | 2 +- docker/1.5-1/base/Dockerfile_arm64.cpu | 2 +- docker/1.5-1/final/Dockerfile.cpu | 4 ++-- docker/1.5-1/final/Dockerfile_arm64.cpu | 4 ++-- requirements.txt | 2 +- setup.py | 2 ++ test/resources/versions/train.py | 4 ++-- 11 files changed, 15 insertions(+), 13 deletions(-) diff --git a/ci/buildspec.yml b/ci/buildspec.yml index ad4b03bf..4a70dd88 100644 --- a/ci/buildspec.yml +++ b/ci/buildspec.yml @@ -3,7 +3,7 @@ version: 0.2 phases: install: runtime-versions: - python: 3.8 + python: 3.10 docker: 17 pre_build: commands: diff --git a/ci/buildspec_amd64.yml b/ci/buildspec_amd64.yml index ca9d9869..8c8ef39a 100644 --- a/ci/buildspec_amd64.yml +++ b/ci/buildspec_amd64.yml @@ -3,7 +3,7 @@ version: 0.2 phases: install: runtime-versions: - python: 3.8 + python: 3.10 docker: 19 pre_build: commands: diff --git a/ci/buildspec_arm.yml b/ci/buildspec_arm.yml index 8cb0b14d..47a377cc 100644 --- a/ci/buildspec_arm.yml +++ b/ci/buildspec_arm.yml @@ -3,7 +3,7 @@ version: 0.2 phases: install: runtime-versions: - python: 3.8 + python: 3.10 docker: 19 pre_build: commands: diff --git a/ci/buildspec_multiarch.yml b/ci/buildspec_multiarch.yml index eaf92fe2..b8b24041 100644 --- a/ci/buildspec_multiarch.yml +++ b/ci/buildspec_multiarch.yml @@ -3,7 +3,7 @@ version: 0.2 phases: install: runtime-versions: - python: 3.8 + python: 3.10 docker: 19 commands: - yum update -y diff --git a/docker/1.5-1/base/Dockerfile.cpu b/docker/1.5-1/base/Dockerfile.cpu index d497a7e0..7e313edf 100644 --- a/docker/1.5-1/base/Dockerfile.cpu +++ b/docker/1.5-1/base/Dockerfile.cpu @@ -8,7 +8,7 @@ ARG MINICONDA_VERSION=4.9.2 ARG CONDA_PY_VERSION=39 ARG CONDA_CHECKSUM="b4e46fcc8029e2cfa731b788f25b1d36" ARG CONDA_PKG_VERSION=4.10.1 -ARG PYTHON_VERSION=3.8.13 +ARG PYTHON_VERSION=3.10.4 ARG PYARROW_VERSION=1.0 ARG MLIO_VERSION=0.7.0 ARG XGBOOST_VERSION=1.5.2 diff --git a/docker/1.5-1/base/Dockerfile_arm64.cpu b/docker/1.5-1/base/Dockerfile_arm64.cpu index 6ae8884b..99454df3 100644 --- a/docker/1.5-1/base/Dockerfile_arm64.cpu +++ b/docker/1.5-1/base/Dockerfile_arm64.cpu @@ -7,7 +7,7 @@ ARG MINICONDA_VERSION=4.9.2 ARG CONDA_PY_VERSION=39 ARG CONDA_CHECKSUM="af1c16d821569ebf1bdaf549fcba7d27" ARG CONDA_PKG_VERSION=4.10.1 -ARG PYTHON_VERSION=3.8.13 +ARG PYTHON_VERSION=3.10.4 ARG PYARROW_VERSION=1.0 ARG MLIO_VERSION=arch-agnostic ARG XGBOOST_VERSION=1.5.2 diff --git a/docker/1.5-1/final/Dockerfile.cpu b/docker/1.5-1/final/Dockerfile.cpu index de79200b..be333a6e 100644 --- a/docker/1.5-1/final/Dockerfile.cpu +++ b/docker/1.5-1/final/Dockerfile.cpu @@ -1,5 +1,5 @@ ARG SAGEMAKER_XGBOOST_VERSION=1.5-1 -ARG PYTHON_VERSION=3.8 +ARG PYTHON_VERSION=3.10 FROM xgboost-container-base:${SAGEMAKER_XGBOOST_VERSION}-cpu-py3 @@ -15,7 +15,7 @@ RUN python3 -m pip install -r /requirements.txt && rm /requirements.txt # Copy wheel to container # ########################### COPY dist/sagemaker_xgboost_container-2.0-py2.py3-none-any.whl /sagemaker_xgboost_container-1.0-py2.py3-none-any.whl -RUN rm -rf /miniconda3/lib/python3.7/site-packages/numpy-1.21.2.dist-info && \ +RUN rm -rf /miniconda3/lib/python3.7/site-packages/numpy-1.22.4.dist-info && \ python3 -m pip install --no-cache /sagemaker_xgboost_container-1.0-py2.py3-none-any.whl && \ python3 -m pip uninstall -y typing && \ rm /sagemaker_xgboost_container-1.0-py2.py3-none-any.whl diff --git a/docker/1.5-1/final/Dockerfile_arm64.cpu b/docker/1.5-1/final/Dockerfile_arm64.cpu index 4a55545b..ba2c7fb4 100644 --- a/docker/1.5-1/final/Dockerfile_arm64.cpu +++ b/docker/1.5-1/final/Dockerfile_arm64.cpu @@ -1,5 +1,5 @@ ARG SAGEMAKER_XGBOOST_VERSION=1.5-1 -ARG PYTHON_VERSION=3.8 +ARG PYTHON_VERSION=3.10 FROM xgboost-container-base:${SAGEMAKER_XGBOOST_VERSION}-cpu-py3-arm64 @@ -15,7 +15,7 @@ RUN python3 -m pip install -r /requirements.txt && rm /requirements.txt # Copy wheel to container # ########################### COPY dist/sagemaker_xgboost_container-2.0-py2.py3-none-any.whl /sagemaker_xgboost_container-1.0-py2.py3-none-any.whl -RUN rm -rf /miniconda3/lib/python3.8/site-packages/numpy-1.21.2.dist-info && \ +RUN rm -rf /miniconda3/lib/python3.8/site-packages/numpy-1.22.4.dist-info && \ python3 -m pip install --no-cache /sagemaker_xgboost_container-1.0-py2.py3-none-any.whl && \ python3 -m pip uninstall -y typing && \ rm /sagemaker_xgboost_container-1.0-py2.py3-none-any.whl diff --git a/requirements.txt b/requirements.txt index cab98725..457eb857 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ gunicorn==19.10.0 itsdangerous==2.0.1 matplotlib==3.4.1 multi-model-server==1.1.2 -numpy==1.21.0 +numpy==1.22.4 pandas==1.2.4 protobuf==3.20.1 psutil==5.6.7 # sagemaker-containers requires psutil 5.6.7 diff --git a/setup.py b/setup.py index 37edccaa..c0e3a2a9 100644 --- a/setup.py +++ b/setup.py @@ -31,6 +31,8 @@ def read(fname): 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', ], install_requires=read("requirements.txt"), diff --git a/test/resources/versions/train.py b/test/resources/versions/train.py index 60797352..e5c56f87 100644 --- a/test/resources/versions/train.py +++ b/test/resources/versions/train.py @@ -3,7 +3,7 @@ PYTHON_MAJOR_VERSION = 3 -PYTHON_MINOR_VERSION = 8 +PYTHON_MINOR_VERSION = 10 REQUIREMENTS = """\ Flask==1.1.1 Pillow==9.1.0 @@ -15,7 +15,7 @@ gunicorn==19.10.0 matplotlib==3.4.1 multi-model-server==1.1.2 -numpy==1.21.0 +numpy==1.22.4 pandas==1.2.4 psutil==5.6.7 pyarrow==1.0.1