Home

Awesome

Image Gen Demo

At a very high level, this demo uses generative AI with OpenAI to take in prompts, generates images with Dall-E and places them into a database. It consists of three parts, which are explained later.

Table of Contents

Prerequisites

Have the following CLIs:

TODO: add kubens to not need -n gen

Other:

TODO: add docs link

Infrastructure

We will need a:

Set up DigitalOcean Infrastructure

If you use the Hivenetes k8s boostrapper you can have it create all of these resources for you:

  1. Clone https://github.com/hivenetes/k8s-bootstrapper
  2. Follow the Terraform instructions

Note: Enable the database in bootstrapper.tfvars before running terraform plan. You can also enable the container registry if you want to use it instead of Docker Hub.

Architecture

Applications

Launcher

This application takes in prompts for OpenAI and launches jobs for each prompt.

Image Generator and Database store

This app uses bash to talk to the OpenAI API to create a Dall-E image. It then stores these prompts and image URLs into a database.

Database

This is a Java application that uses Spring Data and Spring Web to create a database table and REST endpoint to make GET and POST requests. It's specifically for a PostgreSQL database.

Things to do

  1. Create gen namespace
    kubectl apply -f k8s/namespace.yaml
    
  2. Create and run database app
  3. Create and run image generator and store app
  4. Create and run launcher app
  5. Observability

TODO

Mandatory by VMware Explore/SpringOne talk

Ideal by Explore

Future work