-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
42 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
function set_options(){ | ||
if [ "${DRYRUN:-}" == "" ]; then # Execute command when DRYRUN is unset | ||
set -euxo pipefail | ||
fi | ||
} | ||
# You can dry run each command like | ||
# DRYRUN=1 make run-container | ||
function run(){ | ||
if [ "${DRYRUN:-}" == "" ]; then # Execute command when DRYRUN is unset | ||
"$@" | ||
else # Dry-run otherwise | ||
{ | ||
set +x | ||
echo -n "[DRYRUN]" | ||
echo "$@" | ||
} >&2 | ||
fi | ||
} | ||
NAME=llm-foundry | ||
ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text) | ||
S3_BUCKET_NAME=${NAME}-${ACCOUNT_ID}-bucket | ||
REGION=ap-northeast-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env bash | ||
set -euxo pipefail | ||
|
||
docker build -t llm-foundry . | ||
. config.env | ||
set_options | ||
run docker build -t llm-foundry . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
. config.env | ||
|
||
set_options | ||
run aws cloudformation create-stack --stack-name s3-${NAME} \ | ||
--template-body file://../../1.architectures/0.s3/0.private-bucket.yaml \ | ||
--parameters ParameterKey=S3BucketName,ParameterValue=${S3_BUCKET_NAME} \ | ||
--region ${REGION} --capabilities=CAPABILITY_IAM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters