File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ version : 0.2
2
+
3
+ env :
4
+ variables :
5
+ INSTANCE_TYPE : " ml.m5.xlarge"
6
+ REGION : " us-west-2"
7
+
8
+ phases :
9
+ pre_build :
10
+ commands :
11
+ - PR_NUM=$(echo $CODEBUILD_SOURCE_VERSION | grep -o '[0-9]\+')
12
+ - NOTEBOOKS="$(pr-notebook-filenames --pr $PR_NUM)"
13
+
14
+ build :
15
+ commands :
16
+ - |-
17
+ if [ -z "$NOTEBOOKS" ]; then
18
+ echo "No notebooks to test in this pull request."
19
+ else
20
+ echo "Testing $NOTEBOOKS"
21
+ aws s3 cp s3://sagemaker-mead-cli/mead-nb-test.tar.gz mead-nb-test.tar.gz
22
+ tar -xzf mead-nb-test.tar.gz
23
+ export JAVA_HOME=$(get-java-home)
24
+ echo "set JAVA_HOME=$JAVA_HOME"
25
+ export SAGEMAKER_ROLE_ARN=$(aws iam list-roles --output text --query "Roles[?RoleName == 'SageMakerRole'].Arn")
26
+ echo "set SAGEMAKER_ROLE_ARN=$SAGEMAKER_ROLE_ARN"
27
+ ./runtime/bin/mead-run-nb-test \
28
+ --instance-type $INSTANCE_TYPE \
29
+ --region $REGION \
30
+ --notebook-instance-role-arn $SAGEMAKER_ROLE_ARN \
31
+ $NOTEBOOKS
32
+ fi
You can’t perform that action at this time.
0 commit comments