defenseunicorns / leapfrogai

Production-ready Generative AI for local, cloud native, airgap, and edge deployments.
https://leapfrog.ai
Apache License 2.0
244 stars 25 forks source link

chore(docs): update developer and installation docs #610

Closed unicorn-kp closed 2 weeks ago

unicorn-kp commented 2 weeks ago

Quick Start guide should be updated from uds deploy k3d-core-slim-dev:0.18.0 to uds deploy k3d-core-slim-dev:0.22.0 otherwise Supabase deployment fails.

justinthelaw commented 2 weeks ago

Please note that these steps only allow you to access basic AI chat through our LeapfrogAI UI in developer mode, using CPU-only.

General Reminders

k3d cluster delete uds  # kills a running uds cluster
uds zarf tools clear-cache # clears the Zarf tool cache
rm -rf ~/.uds-cache # clears the UDS cache
docker system prune -a -f # removes all hanging containers and images
docker volume prune -f # removes all hanging container volumes

General Debugging

Deploy UDS Core

  1. Ensure that UDS Core prerequisites are fulfilled: https://github.com/defenseunicorns/uds-core#prerequisites
  2. Install the latest minor version of UDS Core with the following command: uds deploy k3d-core-slim-dev:0.22.0
  3. Everything should install without any issues on an LTS, Debian-based OS

Deploy LeapfrogAI

  1. Build and deploy the LeapfrogAI 0.7.2 (latest) CPU bundle:
    cd uds-bundles/dev/cpu
    uds create .
    uds deploy uds-bundle-leapfrogai*.tar.zst --confirm

Access LeapfrogAI UI via KeyCloak SSO

  1. Connect to the KeyCloak admin panel a. Run the following to get a port-forwarded tunnel: uds zarf connect keycloak b. Go to the resulting localhost URL and create an admin account
  2. Go to ai.uds.dev and press "Login using SSO"
  3. Register a new user by pressing "Register Here"
  4. Fill-in all of the information a. The bot detection requires you to scroll and click around in a natural way, so if the Register button is not activated despite correct information, try moving around the page until the bot detection says 100% verified
  5. Using an authenticator, follow the MFA steps
  6. Go to sso.uds.dev a. Login using the admin account you created earlier
  7. Approve the newly registered user a. Click on the hamburger menu in the top left to open/close the sidebar b. Go to the dropdown that likely says "Keycloak" and switch to the "uds" context c. Click "Users" in the sidebar d. Click on the newly registered user's username e. Go to the "Email Verified" switch and toggle it to be "Yes" f. Scroll to the bottom and press "Save"
  8. Go back to ai.uds.dev and login as the registered user
  9. You should now have the AI chat interface in front of you a. Only general AI chat works b. Assistants, RAG, etc. will not be functional in this developer install and version