forked from aws/sagemaker-tensorflow-serving-container
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.yml
91 lines (81 loc) · 3.01 KB
/
buildspec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
version: 0.2
phases:
pre_build:
commands:
- start-dockerd
# fix permissions dropped by CodePipeline
- chmod +x ./scripts/*.sh
- chmod +x ./container/sagemaker/serve
build:
commands:
# prepare the release (update versions, changelog etc.)
- if is-release-build; then git-release --prepare; fi
- tox -e jshint,flake8,pylint
# build images
- ./scripts/build-all.sh
# run local tests
- tox -e py36 -- test/integration/local --framework-version 1.11
- tox -e py36 -- test/integration/local --framework-version 1.12
- tox -e py36 -- test/integration/local --framework-version 1.13
# push docker images to ECR
- |
if is-release-build; then
./scripts/publish-all.sh
fi
# run SageMaker tests
- |
if is-release-build; then
tox -e py36 -- -n 8 test/integration/sagemaker/test_tfs.py --versions 1.13.0
fi
# write deployment details to file
# todo sort out eia versioning
# todo add non-eia tests
- |
if is-release-build; then
echo '[{
"repository": "sagemaker-tensorflow-serving",
"tags": [{
"source": "1.11.1-cpu",
"dest": ["1.11.1-cpu", "1.11-cpu", "1.11.1-cpu-'${CODEBUILD_BUILD_ID#*:}'"]
},{
"source": "1.11.1-gpu",
"dest": ["1.11.1-gpu", "1.11-gpu", "1.11.1-gpu-'${CODEBUILD_BUILD_ID#*:}'"]
},{
"source": "1.12.0-cpu",
"dest": ["1.12.0-cpu", "1.12-cpu", "1.12.0-cpu-'${CODEBUILD_BUILD_ID#*:}'"]
},{
"source": "1.12.0-gpu",
"dest": ["1.12.0-gpu", "1.12-gpu", "1.12.0-gpu-'${CODEBUILD_BUILD_ID#*:}'"]
},{
"source": "1.13.0-cpu",
"dest": ["1.13.0-cpu", "1.13-cpu", "1.13.0-cpu-'${CODEBUILD_BUILD_ID#*:}'"]
},{
"source": "1.13.0-gpu",
"dest": ["1.13.0-gpu", "1.13-gpu", "1.13.0-gpu-'${CODEBUILD_BUILD_ID#*:}'"]
}],
"test": [
"tox -e py36 -- -n 8 test/integration/sagemaker/test_tfs.py::test_tfs_model --versions 1.13.0 --region {region} --registry {aws-id}"
]
}, {
"repository": "sagemaker-tensorflow-serving-eia",
"tags": [{
"source": "1.11-cpu",
"dest": ["1.11.0-cpu", "1.11.1-cpu", "1.11-cpu", "1.11.1-cpu-'${CODEBUILD_BUILD_ID#*:}'"]
},{
"source": "1.12-cpu",
"dest": ["1.12.0-cpu", "1.12-cpu", "1.12.0-cpu-'${CODEBUILD_BUILD_ID#*:}'"]
},{
"source": "1.13-cpu",
"dest": ["1.13.0-cpu", "1.13-cpu", "1.13.0-cpu-'${CODEBUILD_BUILD_ID#*:}'"]
}],
"test": [
"tox -e py36 -- test/integration/sagemaker/test_ei.py -n 8 --region {region} --registry {aws-id}"
]
}]' > deployments.json
fi
# publish the release to github
- if is-release-build; then git-release --publish; fi
artifacts:
files:
- deployments.json
name: ARTIFACT_1