From 6de4aee4204a068d94faaa92b10401bc2cd508c0 Mon Sep 17 00:00:00 2001 From: Satish Pasumarthi Date: Wed, 29 Sep 2021 03:05:55 -0700 Subject: [PATCH] Fix missing py version issues --- buildspec-release.yml | 6 ++-- buildspec.yml | 2 +- setup.py | 4 +-- test/container/dummy/Dockerfile | 62 ++++++++++++++++----------------- 4 files changed, 36 insertions(+), 38 deletions(-) diff --git a/buildspec-release.yml b/buildspec-release.yml index 472fac03..3f3267fe 100644 --- a/buildspec-release.yml +++ b/buildspec-release.yml @@ -19,11 +19,11 @@ phases: # run unit tests - AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_SESSION_TOKEN= AWS_CONTAINER_CREDENTIALS_RELATIVE_URI= AWS_DEFAULT_REGION= - tox -e py36,py37 --parallel all -- test/unit + tox -e py37,py38 --parallel all -- test/unit # run functional tests - $(aws ecr get-login --no-include-email --region us-west-2) - - IGNORE_COVERAGE=- tox -e py36,py37 -- test/functional + - IGNORE_COVERAGE=- tox -e py37,py38 -- test/functional # build dummy container @@ -36,7 +36,7 @@ phases: - cd ../.. # run local integration tests - - IGNORE_COVERAGE=- tox -e py36,py37 -- test/integration/local + - IGNORE_COVERAGE=- tox -e py37,py38 -- test/integration/local # generate the distribution package - python3 setup.py sdist diff --git a/buildspec.yml b/buildspec.yml index d2edfeeb..613861c6 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -17,7 +17,7 @@ phases: # run unit tests - AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_SESSION_TOKEN= AWS_CONTAINER_CREDENTIALS_RELATIVE_URI= AWS_DEFAULT_REGION= - tox -e py36,py37 --parallel all -- test/unit + tox -e py37,py38 --parallel all -- test/unit # run functional tests - $(aws ecr get-login --no-include-email --region us-west-2) diff --git a/setup.py b/setup.py index 994e2c8f..f79aca14 100644 --- a/setup.py +++ b/setup.py @@ -74,8 +74,6 @@ def read_version(): "Natural Language :: English", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", ], @@ -87,7 +85,7 @@ def read_version(): "pytest-cov", "mock", "sagemaker[local]<2", - "black==19.3b0 ; python_version >= '3.6'", + "black==19.3b0 ; python_version >= '3.7'", ] }, entry_points={"console_scripts": ["train=sagemaker_training.cli.train:main"]}, diff --git a/test/container/dummy/Dockerfile b/test/container/dummy/Dockerfile index 03d3852b..baf7dff8 100644 --- a/test/container/dummy/Dockerfile +++ b/test/container/dummy/Dockerfile @@ -5,47 +5,47 @@ ENV DEBIAN_FRONTEND="noninteractive" ARG PYTHON=python3 ARG PIP=pip3 -ARG PYTHON_VERSION=3.6.8 +ARG PYTHON_VERSION=3.7.10 RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - build-essential \ - ca-certificates \ - wget \ - zlib1g-dev \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* + && apt-get install -y --no-install-recommends \ + build-essential \ + ca-certificates \ + wget \ + zlib1g-dev \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* RUN wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz \ - && tar -xvf Python-$PYTHON_VERSION.tgz \ - && cd Python-$PYTHON_VERSION \ - && ./configure \ - && make \ - && make install \ - && apt-get update \ - && apt-get install -y --no-install-recommends \ - libreadline-gplv2-dev \ - libncursesw5-dev \ - libssl-dev \ - libsqlite3-dev \ - libgdbm-dev \ - libc6-dev \ - libbz2-dev \ - tk-dev \ - && make \ - && make install \ - && rm -rf ../Python-$PYTHON_VERSION* \ - && ln -s /usr/local/bin/pip3 /usr/bin/pip \ - && ln -s $(which ${PYTHON}) /usr/local/bin/python \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* + && tar -xvf Python-$PYTHON_VERSION.tgz \ + && cd Python-$PYTHON_VERSION \ + && ./configure \ + && make \ + && make install \ + && apt-get update \ + && apt-get install -y --no-install-recommends \ + libreadline-gplv2-dev \ + libncursesw5-dev \ + libssl-dev \ + libsqlite3-dev \ + libgdbm-dev \ + libc6-dev \ + libbz2-dev \ + tk-dev \ + && make \ + && make install \ + && rm -rf ../Python-$PYTHON_VERSION* \ + && ln -s /usr/local/bin/pip3 /usr/bin/pip \ + && ln -s $(which ${PYTHON}) /usr/local/bin/python \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* COPY dummy/sagemaker_training.tar.gz /sagemaker_training.tar.gz RUN ${PIP} install --upgrade pip==21.0.1 RUN ${PIP} install --no-cache-dir \ - /sagemaker_training.tar.gz + /sagemaker_training.tar.gz RUN rm /sagemaker_training.tar.gz