-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated MLIO version and added buildspec
- Loading branch information
Nikhil Raverkar
committed
Sep 12, 2022
1 parent
4a77d1d
commit 1d60071
Showing
7 changed files
with
101 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
version: 0.2 | ||
|
||
phases: | ||
install: | ||
runtime-versions: | ||
python: 3.8 | ||
docker: 19 | ||
pre_build: | ||
commands: | ||
- echo Pre-build started on `date` | ||
- echo Installing dependencies... | ||
- curl -LO http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh | ||
- bash Miniconda3-latest-Linux-x86_64.sh -bfp /miniconda3 | ||
- export PATH=/miniconda3/bin:${PATH} | ||
- conda install python=3.8 | ||
- conda update -y conda | ||
- python3 -m pip install pip==20.1 | ||
- python3 -m pip install .[test] | ||
build: | ||
commands: | ||
- echo Build started on `date` | ||
- echo Docker login... | ||
- docker login -u $dockerhub_username -p $dockerhub_password | ||
- echo Building the Docker image... | ||
- docker build -t xgboost-container-base:$FRAMEWORK_VERSION-cpu-py3 -f docker/$FRAMEWORK_VERSION/base/Dockerfile.cpu . | ||
- python3 setup.py bdist_wheel --universal | ||
- docker build -t preprod-xgboost-container:$FRAMEWORK_VERSION-cpu-py3 -f docker/$FRAMEWORK_VERSION/final/Dockerfile.cpu . | ||
- printf "FROM preprod-xgboost-container:$FRAMEWORK_VERSION-cpu-py3\nADD . /app\nWORKDIR /app\nRUN python3 -m pip install .[test]" > Dockerfile.test | ||
- docker build -t test-xgboost-container -f Dockerfile.test . | ||
- echo Running tox... | ||
- docker run --rm -t test-xgboost-container sh -c 'tox -e ALL' | ||
- echo Running container tests... | ||
- pytest test/integration/local --docker-base-name preprod-xgboost-container --tag $FRAMEWORK_VERSION-cpu-py3 --py-version 3 --framework-version $FRAMEWORK_VERSION | ||
- docker tag preprod-xgboost-container:$FRAMEWORK_VERSION-cpu-py3 $SM_ALPHA.dkr.ecr.us-west-2.amazonaws.com/sagemaker-xgboost:$FRAMEWORK_VERSION-cpu-py3 | ||
- docker tag preprod-xgboost-container:$FRAMEWORK_VERSION-cpu-py3 $SM_ALPHA.dkr.ecr.us-west-2.amazonaws.com/sagemaker-xgboost:$FRAMEWORK_VERSION | ||
post_build: | ||
commands: | ||
- echo Build completed on `date` | ||
- | | ||
case $CODEBUILD_WEBHOOK_EVENT in | ||
PULL_REQUEST_MERGED) | ||
echo Logging in to Amazon ECR... | ||
$(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION) | ||
echo Pushing the Docker image... | ||
docker push $SM_ALPHA.dkr.ecr.us-west-2.amazonaws.com/sagemaker-xgboost:$FRAMEWORK_VERSION-cpu-py3 | grep -v -E "[0-9]{12}.dkr.ecr.\S+.amazonaws.com" | ||
docker push $SM_ALPHA.dkr.ecr.us-west-2.amazonaws.com/sagemaker-xgboost:$FRAMEWORK_VERSION | grep -v -E "[0-9]{12}.dkr.ecr.\S+.amazonaws.com" | ||
;; | ||
PULL_REQUEST_CREATED | PULL_REQUEST_UPDATED | PULL_REQUEST_REOPENED) | ||
echo Logging in to Amazon ECR... | ||
$(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION) | ||
echo Pushing the Docker image... | ||
# pushes test tag for manual verification, requires cleanup in ECR every once in a while though | ||
TEST_TAG=$SM_ALPHA.dkr.ecr.us-west-2.amazonaws.com/sagemaker-xgboost:${FRAMEWORK_VERSION}-cpu-py3-test | ||
docker tag preprod-xgboost-container:$FRAMEWORK_VERSION-cpu-py3 ${TEST_TAG} | ||
docker push ${TEST_TAG} | grep -v -E "[0-9]{12}.dkr.ecr.\S+.amazonaws.com" | ||
;; | ||
*) | ||
echo Undefined behavior for webhook event type $CODEBUILD_WEBHOOK_EVENT | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,27 @@ | ||
Flask==1.1.1 # sagemaker-containers requires flask 1.1.1 | ||
PyYAML==5.4.1 | ||
boto3==1.10.14 | ||
botocore==1.13.14 | ||
gunicorn<20.0.0 | ||
cryptography==3.4.6 | ||
Pillow==9.1.0 | ||
boto3==1.17.52 | ||
botocore==1.20.52 | ||
cryptography==35.0.0 | ||
gunicorn==19.10.0 | ||
matplotlib==3.3.2 | ||
multi-model-server==1.1.1 | ||
numpy==1.19.2 | ||
pandas==1.1.3 | ||
protobuf==3.20.1 | ||
psutil==5.6.7 # sagemaker-containers requires psutil 5.6.7 | ||
python-dateutil==2.8.0 | ||
requests<2.21 | ||
requests==2.25.1 | ||
retrying==1.3.3 | ||
sagemaker-containers>=2.8.3,<2.9 | ||
sagemaker-containers==2.8.6.post2 | ||
sagemaker-inference==1.2.0 | ||
scikit-learn==0.23.2 | ||
scipy==1.2.2 | ||
smdebug==0.4.13 | ||
urllib3==1.25.9 | ||
wheel | ||
scipy==1.5.3 | ||
smdebug==1.0.10 | ||
urllib3==1.26.5 | ||
wheel==0.35.1 | ||
jinja2==3.0.3 | ||
itsdangerous==2.0.1 | ||
MarkupSafe==2.1.1 | ||
Werkzeug==0.15.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
Flask==1.1.1 | ||
coverage | ||
docker-compose | ||
flake8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters