Skip to content

Commit 7f97b4d

Browse files
authored
infra: add PR buildspec (#1642)
* add notebook instance buildspec
1 parent 4764539 commit 7f97b4d

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

buildspec-notebook-instance.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: 0.2
2+
3+
env:
4+
variables:
5+
INSTANCE_TYPE: 'ml.c4.8xlarge'
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+
- echo "testing $NOTEBOOKS"
17+
18+
- set -euo pipefail
19+
20+
- aws s3 cp s3://sagemaker-mead-cli/mead-nb-test.tar.gz mead-nb-test.tar.gz
21+
- tar -xzf mead-nb-test.tar.gz
22+
- export JAVA_HOME=$(get-java-home)
23+
- echo "set JAVA_HOME=$JAVA_HOME"
24+
- export SAGEMAKER_ROLE_ARN=$(aws iam list-roles --output text --query "Roles[?RoleName == 'SageMakerRole'].Arn")
25+
- echo "set SAGEMAKER_ROLE_ARN=$SAGEMAKER_ROLE_ARN"
26+
27+
- |
28+
./runtime/bin/mead-run-nb-test \
29+
--instance-type $INSTANCE_TYPE \
30+
--region $REGION \
31+
--notebook-instance-role-arn $SAGEMAKER_ROLE_ARN \
32+
($NOTEBOOKS)

0 commit comments

Comments
 (0)