Skip to content

Commit

Permalink
Fix missing py version issues
Browse files Browse the repository at this point in the history
  • Loading branch information
satishpasumarthi committed Sep 29, 2021
1 parent 259999d commit 6de4aee
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 38 deletions.
6 changes: 3 additions & 3 deletions buildspec-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
Expand All @@ -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"]},
Expand Down
62 changes: 31 additions & 31 deletions test/container/dummy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 6de4aee

Please sign in to comment.