@@ -79,6 +79,25 @@ phases:
79
79
- build_cmd="docker build --cache-from $PROD_IMAGE:$prod_tag -f $GPU_DOCKERFILE -t $PREPROD_IMAGE:$GPU_TAG_PY3 . "
80
80
- execute-command-if-has-matching-changes "$build_cmd" "test/" "docker/*" "buildspec.yml"
81
81
82
+ # build py37 images
83
+
84
+ # prepare build context
85
+ - build_dir="$root_dir/docker/$FRAMEWORK_VERSION/py37"
86
+ - cp $build_artifacts/*.py $build_dir/
87
+ - cd $build_dir
88
+
89
+ # build cpu image
90
+ - prod_tag="$FRAMEWORK_VERSION-cpu-py37"
91
+ - CPU_TAG_PY37="$prod_tag-$build_id"
92
+ - build_cmd="docker build --no-cache -f $CPU_DOCKERFILE -t $PREPROD_IMAGE:$CPU_TAG_PY37 . "
93
+ - execute-command-if-has-matching-changes "$build_cmd" "test/" "docker/*" "buildspec.yml"
94
+
95
+ # build gpu image
96
+ - prod_tag="$FRAMEWORK_VERSION-gpu-py37"
97
+ - GPU_TAG_PY37="$prod_tag-$build_id"
98
+ - build_cmd="docker build --no-cache -f $GPU_DOCKERFILE -t $PREPROD_IMAGE:$GPU_TAG_PY37 . "
99
+ - execute-command-if-has-matching-changes "$build_cmd" "test/" "docker/*" "buildspec.yml"
100
+
82
101
# push images to ecr
83
102
- $(aws ecr get-login --registry-ids $ACCOUNT --no-include-email --region $AWS_DEFAULT_REGION)
84
103
- push_cmd="docker push $PREPROD_IMAGE:$CPU_TAG_PY2"
@@ -89,6 +108,10 @@ phases:
89
108
- execute-command-if-has-matching-changes "$push_cmd" "test/" "docker/*" "buildspec.yml"
90
109
- push_cmd="docker push $PREPROD_IMAGE:$GPU_TAG_PY3"
91
110
- execute-command-if-has-matching-changes "$push_cmd" "test/" "docker/*" "buildspec.yml"
111
+ - push_cmd="docker push $PREPROD_IMAGE:$CPU_TAG_PY37"
112
+ - execute-command-if-has-matching-changes "$push_cmd" "test/" "docker/*" "buildspec.yml"
113
+ - push_cmd="docker push $PREPROD_IMAGE:$GPU_TAG_PY37"
114
+ - execute-command-if-has-matching-changes "$push_cmd" "test/" "docker/*" "buildspec.yml"
92
115
93
116
# launch remote gpu instance
94
117
- instance_type='p2.xlarge'
@@ -98,6 +121,8 @@ phases:
98
121
# run cpu integration tests
99
122
- py3_cmd="IGNORE_COVERAGE=- tox -e py36 -- test/integration/local --region $AWS_DEFAULT_REGION --docker-base-name $PREPROD_IMAGE --tag $CPU_TAG_PY3 --framework-version $FRAMEWORK_VERSION --py-version 3 --processor cpu --durations 10"
100
123
- execute-command-if-has-matching-changes "$py3_cmd" "test/" "docker/*" "buildspec.yml"
124
+ - py37_cmd="IGNORE_COVERAGE=- tox -e py37 -- test/integration/local --region $AWS_DEFAULT_REGION --docker-base-name $PREPROD_IMAGE --tag $CPU_TAG_PY37 --framework-version $FRAMEWORK_VERSION --py-version 3 --processor cpu --durations 10"
125
+ - execute-command-if-has-matching-changes "$py37_cmd" "test/" "docker/*" "buildspec.yml"
101
126
- py2_cmd="IGNORE_COVERAGE=- tox -e py27 -- test/integration/local --region $AWS_DEFAULT_REGION --docker-base-name $PREPROD_IMAGE --tag $CPU_TAG_PY2 --framework-version $FRAMEWORK_VERSION --py-version 2 --processor cpu --durations 10"
102
127
- execute-command-if-has-matching-changes "$py2_cmd" "test/" "docker/*" "buildspec.yml"
103
128
@@ -111,11 +136,19 @@ phases:
111
136
- py2_cmd="remote-test --github-repo $GITHUB_REPO --test-cmd \"$cmd\" --setup-file $SETUP_FILE --pr-number \"$PR_NUM\" --skip-setup"
112
137
- execute-command-if-has-matching-changes "$py2_cmd" "test/" "docker/*" "buildspec.yml"
113
138
139
+ - cmd="IGNORE_COVERAGE=- tox -e py37 -- test/integration/local -n 4 --region $AWS_DEFAULT_REGION --docker-base-name $PREPROD_IMAGE --tag $GPU_TAG_PY37 --framework-version $FRAMEWORK_VERSION --py-version 3 --processor gpu --durations 10"
140
+ - py37_cmd="remote-test --github-repo $GITHUB_REPO --test-cmd \"$cmd\" --setup-file $SETUP_FILE --pr-number \"$PR_NUM\" --skip-setup"
141
+ - execute-command-if-has-matching-changes "$py37_cmd" "test/" "docker/*" "buildspec.yml"
142
+
114
143
# run sagemaker tests
115
144
- test_cmd="IGNORE_COVERAGE=- tox -e py36 -- test/integration/sagemaker -n 8 --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --account-id $ACCOUNT --tag $CPU_TAG_PY3 --py-version 3 --processor cpu --durations 10"
116
145
- execute-command-if-has-matching-changes "$test_cmd" "test/" "docker/*" "buildspec.yml"
117
146
- test_cmd="IGNORE_COVERAGE=- tox -e py36 -- test/integration/sagemaker -n 8 --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --account-id $ACCOUNT --tag $GPU_TAG_PY3 --py-version 3 --processor gpu --durations 10"
118
147
- execute-command-if-has-matching-changes "$test_cmd" "test/" "docker/*" "buildspec.yml"
148
+ - test_cmd="IGNORE_COVERAGE=- tox -e py37 -- test/integration/sagemaker -n 8 --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --account-id $ACCOUNT --tag $CPU_TAG_PY37 --py-version 3 --processor cpu --durations 10"
149
+ - execute-command-if-has-matching-changes "$test_cmd" "test/" "docker/*" "buildspec.yml"
150
+ - test_cmd="IGNORE_COVERAGE=- tox -e py37 -- test/integration/sagemaker -n 8 --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --account-id $ACCOUNT --tag $GPU_TAG_PY37 --py-version 3 --processor gpu --durations 10"
151
+ - execute-command-if-has-matching-changes "$test_cmd" "test/" "docker/*" "buildspec.yml"
119
152
- test_cmd="IGNORE_COVERAGE=- tox -e py27 -- test/integration/sagemaker -n 8 --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --account-id $ACCOUNT --tag $CPU_TAG_PY2 --py-version 2 --processor cpu --durations 10"
120
153
- execute-command-if-has-matching-changes "$test_cmd" "test/" "docker/*" "buildspec.yml"
121
154
- test_cmd="IGNORE_COVERAGE=- tox -e py27 -- test/integration/sagemaker -n 8 --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --account-id $ACCOUNT --tag $GPU_TAG_PY2 --py-version 2 --processor gpu --durations 10"
@@ -135,3 +168,7 @@ phases:
135
168
- execute-command-if-has-matching-changes "$delete_cmd" "test/" "docker/*" "buildspec.yml"
136
169
- delete_cmd="aws ecr batch-delete-image --repository-name $ECR_REPO --region $AWS_DEFAULT_REGION --image-ids imageTag=$GPU_TAG_PY3"
137
170
- execute-command-if-has-matching-changes "$delete_cmd" "test/" "docker/*" "buildspec.yml"
171
+ - delete_cmd="aws ecr batch-delete-image --repository-name $ECR_REPO --region $AWS_DEFAULT_REGION --image-ids imageTag=$CPU_TAG_PY37"
172
+ - execute-command-if-has-matching-changes "$delete_cmd" "test/" "docker/*" "buildspec.yml"
173
+ - delete_cmd="aws ecr batch-delete-image --repository-name $ECR_REPO --region $AWS_DEFAULT_REGION --image-ids imageTag=$GPU_TAG_PY37"
174
+ - execute-command-if-has-matching-changes "$delete_cmd" "test/" "docker/*" "buildspec.yml"
0 commit comments