top of page
Chandan Kumar

Deploy DB SQL AI Agent in Shadeform.ai with Denvr Cloud in Minutes


Why Shadeform.ai and Denvr Cloud?


Shadeform.ai provides an intuitive platform for hosting AI-powered applications with a focus on interactivity and ease of integration. Pairing this with Denvr Cloud offers:

  • Scalability: Run complex AI workloads effortlessly.

  • Performance: Leverage Denvr Cloud's GPU-powered servers for high-speed computation.

  • Flexibility: Deploy on-demand resources with support for hybrid and edge environments.


What is the DB-Agent?


The DB-Agent is an AI-powered tool that lets users query databases using natural language. Key features include:

  • Support for popular databases like MySQL, PostgreSQL, MongoDB, and more.

  • Real-time interaction with databases to fetch, analyze, and visualize data.

  • Seamless integration with popular LLM models.


The MVP version is implemented using Streamlit for the UI, with a REST API backend powered by Defog's SQL Model


Pre-requisites


  • Shadeform.ai Account: Ensure you have an active account.

  • Huggingface Token: To run inferencing through Huggingface TGI


Step by Step Deployment Guide


  1. Login to shadeform.ai using your github Account

  2. Top up your account with appropriate amount in order to launch any resource or apply for free credit

  3. Navigate into the market place and select Denvr Cloud




  1. Choose your choice of GPU platform based on availability and your application requirement. In this example, I will go with A100 VM


  1. Use the 1-Click VM launch functionality to launch the VM


  1. It could take upto 8-10 minutes to launch the VM and wait for status to become "active"

  1. Once active simply copy the Public IP address to connect to your VM

  1. If you had selected to use shadeform managed SSH key, you can simply download it from portal

% chmod 400 shadeform_key.pem
% ssh -i shadeform_key.pem shadeform@198.145.127.227

  1. Once logged in, simply clone the db-agent repo from github, you can choose any other application of your choice.

% git clone https://github.com/db-agent/db-agent.git
Cloning into 'db-agent'...
remote: Enumerating objects: 434, done.
remote: Counting objects: 100% (54/54), done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 434 (delta 32), reused 24 (delta 24), pack-reused 380 (from 1)
Receiving objects: 100% (434/434), 6.46 MiB | 18.14 MiB/s, done.
Resolving deltas: 100% (206/206), done.

  1. Follow the instruction from its README page
export HF_TOKEN=<YOUR TOKEN>
docker compose -f docker-compose.tgi.yml build
docker compose -f docker-compose.tgi.yml up -d

  1. Once all containers are up, you can access your SQL AI Agent at
http://<public-ip>:8501


Conclusion


Integrating Shadeform.ai with Denvr Cloud offers a robust environment for deploying AI-powered solutions like the DB-Agent. By following this guide, you can create a powerful, scalable database agent that revolutionizes how users interact with data.

Ready to get started? Head over to Denvr Cloud and Shadeform.ai to set up your deployment today!

0 views0 comments

コメント


bottom of page