/bracket-picker

Uses LLMs to pick March Madness bracket winners.

Primary LanguagePythonMIT LicenseMIT

Bracket Picker

Fill out a March Madness Bracket with a prompt.

Setup

If you don’t have Python installed, install it from here.

  1. Clone this repository

  2. Navigate into the project directory

    $ cd bracket-picker
  3. Create a new virtual environment

    $ virtualenv virt
    $ source virt/bin/activate
  4. Install the requirements

    $ pip install -r cli_requirements.txt
  5. Make a copy of the example environment variables file

    $ cp .env.example .env
  6. Add your OpenAI API key to the newly created .env file

CLI

  1. Run the application

    $ ./cli.sh

Lambda Deployment

  1. Build docker image

    $ docker build --platform linux/arm64 -t ${DOCKER_IMAGE} .
  2. Run docker image

    $ docker run --platform linux/arm64 --env-file=.env -p 9000:8080 --name ${DOCKER_CONTAINER} ${DOCKER_IMAGE}
  3. Test function

    $ curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}'
  4. 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
  5. Create docker tag

    $ docker tag ${DOCKER_IMAGE}:latest ${ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${DOCKER_IMAGE_REPO}:latest
  6. 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.

Contributing

All contributions are welcome! Reach out for more information.