forked from aws-samples/amazon-sagemaker-secure-mlops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (31 loc) · 1.02 KB
/
Makefile
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
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
#SHELL := /bin/sh
PY_VERSION := 3.8
export PYTHONUNBUFFERED := 1
# CloudFormation deployment variables
CFN_BUCKET_NAME ?= $(S3_BUCKET_NAME)
CFN_TEMPLATE_DIR := cfn_templates
CFN_OUTPUT_DIR := build/$(AWS_DEFAULT_REGION)
CFN_STACK_NAME ?=
PYTHON := $(shell /usr/bin/which python$(PY_VERSION))
.DEFAULT_GOAL := package
ifndef CFN_BUCKET_NAME
$(error CFN_BUCKET_NAME is not set)
endif
clean:
rm -fr $(CFN_OUTPUT_DIR)
mkdir -p $(CFN_OUTPUT_DIR)
cp $(CFN_TEMPLATE_DIR)/*.yaml ${CFN_OUTPUT_DIR}
delete:
aws cloudformation delete-stack \
--stack-name $(CFN_STACK_NAME)
build: clean
package: build
./package-cfn.sh $(CFN_BUCKET_NAME) $(AWS_DEFAULT_REGION)
zip:
echo "Zipping the source code"
rm -f sagemaker-secure-mlops.zip
zip -r sagemaker-secure-mlops.zip . -x "*.pdf" -x "*.git*" -x "*.DS_Store*" -x "*.vscode*" -x "/build/*" -x "internal-documents*"
cfn_nag_scan:
cfn_nag_scan --input-path $(CFN_TEMPLATE_DIR)