Fill out a March Madness Bracket with a prompt.
If you don’t have Python installed, install it from here.
-
Clone this repository
-
Navigate into the project directory
$ cd bracket-picker
-
Create a new virtual environment
$ virtualenv virt $ source virt/bin/activate
-
Install the requirements
$ pip install -r cli_requirements.txt
-
Make a copy of the example environment variables file
$ cp .env.example .env
-
Add your OpenAI API key to the newly created .env file
-
Run the application
$ ./cli.sh
-
Build docker image
$ docker build --platform linux/arm64 -t ${DOCKER_IMAGE} .
-
Run docker image
$ docker run --platform linux/arm64 --env-file=.env -p 9000:8080 --name ${DOCKER_CONTAINER} ${DOCKER_IMAGE}
-
Test function
$ curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}'
-
Login to aws ecr
$ aws ecr get-login-password --region ${AWS_REGION} | docker login --username AWS --password-stdin ${ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com
-
Create docker tag
$ docker tag ${DOCKER_IMAGE}:latest ${ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${DOCKER_IMAGE_REPO}:latest
-
Push docker image
$ docker push ${ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${DOCKER_IMAGE_REPO}:latest
For more information on deployments, refer to the deployment docs.
All contributions are welcome! Reach out for more information.