Skip to content

chck/container4ml-aws

Repository files navigation

Container Tutorial for Machine Learning

Blog (Japanese): https://developers.cyberagent.co.jp/blog/archives/42762/

Prerequisites

Software Install (Mac)
Python 3.9.* pyenv install 3.9.16
Poetry 1.5.* curl -sSL https://install.python-poetry.org | python -
direnv brew install direnv
Docker brew cask install docker
AWS CLI brew install awscli
kind brew install kind
hey brew install hey
Terraform brew install terraform

Get Started

Setup local environment

cp .env.example .env

Fill in your AWS resources.

${EDITOR} .env
=====================
AWS_BUCKET=
AWS_REGION=ap-northeast-1
AWS_ACCOUNT_ID=
USER=
TF_VAR_aws_bucket=${AWS_BUCKET}
TF_VAR_github_repo=chck/container4ml-aws
direnv allow .

Create S3 bucket for tfstate

S3 Bucket needs to be unique, you should edit AWS_BUCKET_TFSTATE in Makefile and backend.s3.bucket in infra/01_setting.tf.

$EDITOR Makefile
$EDITOR infra/01_setting.tf
make bucket

Create AWS resources

cd infra
terraform init
terraform apply

Clean up AWS resources

terraform destroy