Skip to content

Commit fb7d0f8

Browse files
mabundayMark Bunday
andauthored
Upgrade Python version from 3.7 to 3.8 (#288)
Co-authored-by: Mark Bunday <mabunday@amazon.com>
1 parent 9fcea4b commit fb7d0f8

File tree

11 files changed

+19
-15
lines changed

11 files changed

+19
-15
lines changed

ci/buildspec.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 0.2
33
phases:
44
install:
55
runtime-versions:
6-
python: 3.7
6+
python: 3.8
77
docker: 17
88
pre_build:
99
commands:
@@ -12,7 +12,7 @@ phases:
1212
- curl -LO http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
1313
- bash Miniconda3-latest-Linux-x86_64.sh -bfp /miniconda3
1414
- export PATH=/miniconda3/bin:${PATH}
15-
- conda install python=3.7
15+
- conda install python=3.8
1616
- conda update -y conda
1717
- conda install -y 'requests<2.21' # sagemaker-python-sdk requires requests<2.21
1818
- python3 -m pip install pip==20.1 # The new pip denpendency resolver in 20.2+ can't resolve 1.0-1 and 0.90 dependencies

ci/buildspec_amd64.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 0.2
33
phases:
44
install:
55
runtime-versions:
6-
python: 3.7
6+
python: 3.8
77
docker: 19
88
pre_build:
99
commands:
@@ -12,7 +12,7 @@ phases:
1212
- curl -LO http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
1313
- bash Miniconda3-latest-Linux-x86_64.sh -bfp /miniconda3
1414
- export PATH=/miniconda3/bin:${PATH}
15-
- conda install python=3.7
15+
- conda install python=3.8
1616
- conda update -y conda
1717
- conda install -y 'requests<2.21' # sagemaker-python-sdk requires requests<2.21
1818
- python3 -m pip install pip==20.1 # The new pip denpendency resolver in 20.2+ can't resolve 1.0-1 and 0.90 dependencies

ci/buildspec_arm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 0.2
33
phases:
44
install:
55
runtime-versions:
6-
python: 3.7
6+
python: 3.8
77
docker: 19
88
pre_build:
99
commands:
@@ -12,7 +12,7 @@ phases:
1212
- curl -LO http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-aarch64.sh
1313
- bash Miniconda3-latest-Linux-aarch64.sh -bfp /miniconda3
1414
- export PATH=/miniconda3/bin:${PATH}
15-
- conda install python=3.7
15+
- conda install python=3.8
1616
- conda update -y conda
1717
- # conda install -y 'requests<2.21' # sagemaker-python-sdk requires requests<2.21
1818
- python3 -m pip install pip==20.1 # The new pip denpendency resolver in 20.2+ can't resolve 1.0-1 and 0.90 dependencies

ci/buildspec_multiarch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 0.2
33
phases:
44
install:
55
runtime-versions:
6-
python: 3.7
6+
python: 3.8
77
docker: 19
88
commands:
99
- yum update -y

docker/1.5-1/base/Dockerfile.cpu

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ARG MINICONDA_VERSION=4.9.2
88
ARG CONDA_PY_VERSION=39
99
ARG CONDA_CHECKSUM="b4e46fcc8029e2cfa731b788f25b1d36"
1010
ARG CONDA_PKG_VERSION=4.10.1
11-
ARG PYTHON_VERSION=3.7.10
11+
ARG PYTHON_VERSION=3.8.13
1212
ARG PYARROW_VERSION=1.0
1313
ARG MLIO_VERSION=0.7.0
1414
ARG XGBOOST_VERSION=1.5.2
@@ -106,7 +106,8 @@ RUN echo "conda ${CONDA_PKG_VERSION}" >> /miniconda3/conda-meta/pinned && \
106106
cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH="$(pwd)/../third-party" ../.. && \
107107
cmake --build . && \
108108
cmake --build . --target install && \
109-
cmake -DMLIO_INCLUDE_PYTHON_EXTENSION=ON -DMLIO_INCLUDE_ARROW_INTEGRATION=ON ../.. && \
109+
cmake -DMLIO_INCLUDE_PYTHON_EXTENSION=ON -DPYTHON_EXECUTABLE="/miniconda3/bin/python3" \
110+
-DMLIO_INCLUDE_ARROW_INTEGRATION=ON ../.. && \
110111
cmake --build . --target mlio-py && \
111112
cmake --build . --target mlio-arrow && \
112113
cd ../../src/mlio-py && \

docker/1.5-1/base/Dockerfile_arm64.cpu

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ARG MINICONDA_VERSION=4.9.2
77
ARG CONDA_PY_VERSION=39
88
ARG CONDA_CHECKSUM="af1c16d821569ebf1bdaf549fcba7d27"
99
ARG CONDA_PKG_VERSION=4.10.1
10-
ARG PYTHON_VERSION=3.7.10
10+
ARG PYTHON_VERSION=3.8.13
1111
ARG PYARROW_VERSION=1.0
1212
ARG MLIO_VERSION=arch-agnostic
1313
ARG XGBOOST_VERSION=1.5.2
@@ -91,7 +91,8 @@ RUN echo "conda ${CONDA_PKG_VERSION}" >> /miniconda3/conda-meta/pinned && \
9191
cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH="$(pwd)/../third-party" ../.. && \
9292
cmake --build . && \
9393
cmake --build . --target install && \
94-
cmake -DMLIO_INCLUDE_PYTHON_EXTENSION=ON -DMLIO_INCLUDE_ARROW_INTEGRATION=ON ../.. && \
94+
cmake -DMLIO_INCLUDE_PYTHON_EXTENSION=ON -DPYTHON_EXECUTABLE="/miniconda3/bin/python3" \
95+
-DMLIO_INCLUDE_ARROW_INTEGRATION=ON ../.. && \
9596
cmake --build . --target mlio-py && \
9697
cmake --build . --target mlio-arrow && \
9798
cd ../../src/mlio-py && \

docker/1.5-1/final/Dockerfile.cpu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG SAGEMAKER_XGBOOST_VERSION=1.5-1
2-
ARG PYTHON_VERSION=3.7
2+
ARG PYTHON_VERSION=3.8
33

44
FROM xgboost-container-base:${SAGEMAKER_XGBOOST_VERSION}-cpu-py3
55

docker/1.5-1/final/Dockerfile_arm64.cpu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG SAGEMAKER_XGBOOST_VERSION=1.5-1
2-
ARG PYTHON_VERSION=3.7
2+
ARG PYTHON_VERSION=3.8
33

44
FROM xgboost-container-base:${SAGEMAKER_XGBOOST_VERSION}-cpu-py3-arm64
55

@@ -15,7 +15,7 @@ RUN python3 -m pip install -r /requirements.txt && rm /requirements.txt
1515
# Copy wheel to container #
1616
###########################
1717
COPY dist/sagemaker_xgboost_container-2.0-py2.py3-none-any.whl /sagemaker_xgboost_container-1.0-py2.py3-none-any.whl
18-
RUN rm -rf /miniconda3/lib/python3.7/site-packages/numpy-1.21.2.dist-info && \
18+
RUN rm -rf /miniconda3/lib/python3.8/site-packages/numpy-1.21.2.dist-info && \
1919
python3 -m pip install --no-cache /sagemaker_xgboost_container-1.0-py2.py3-none-any.whl && \
2020
python3 -m pip uninstall -y typing && \
2121
rm /sagemaker_xgboost_container-1.0-py2.py3-none-any.whl

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ matplotlib==3.4.1
1010
multi-model-server==1.1.2
1111
numpy==1.21.0
1212
pandas==1.2.4
13+
protobuf==3.20.1
1314
psutil==5.6.7 # sagemaker-containers requires psutil 5.6.7
1415
python-dateutil==2.8.1
1516
requests==2.25.1

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def read(fname):
3030
"Programming Language :: Python",
3131
'Programming Language :: Python :: 3.6',
3232
'Programming Language :: Python :: 3.7',
33+
'Programming Language :: Python :: 3.8',
3334
],
3435

3536
install_requires=read("requirements.txt"),

0 commit comments

Comments
 (0)