Welcome to Heatwave Gen AI Demo

!!! Work in progress !!!

this demo RAG on HeatWave GenAI

steps:

  1. Make sure your ssh key is secured (Windows users)

        chmod 700  <your_ssh_key_path>.key
    
  2. Connect to the compute instance you've created earlier today by running the following command on your shell:

        sudo ssh  -i <your_ssh_key_path>.key opc@<instance_ip>
    
  3. After you connected to your machine, install git by running the following command:

        sudo dnf install git -y
    
  4. Install nvm

        curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
    
  5. Disconnect from the server and connect again

        exit
        ssh -a ...
    
  6. Install node lTS

        nvm install --lts
    
  7. Make sure Node is installed

        node -v
    
        result --> v20.15.1
    
  8. Install yarn and pm2

        npm install -g pm2 yarn
    
  9. Clone this project

        git clone https://github.com/OCI-IL/HeatwaveGenAIDemo.git
    
  10. Change to directory

        cd HeatwaveGenAIDemo
    
  11. Run yarn to install all deps.

        yarn
    
  12. Change dir to src

        cd src
    
  13. Run the create_env scripts, the scripts will ask you for the params of the DB and the PARs for the DB and the frontend and will create .env files

        ./create_env.sh
    
  14. Return to root folder $ cd ..

  15. Run the app using pm2

        pm2 start ecosystem.config.js
    
  16. Save the config of pm2

        pm2 save
    
  17. Set pm2 to run on startup

        pm2 startup systemd
    
  18. The pm2 startup systemd command will generate a command that you need to run with sudo. It usually looks like this:

        sudo env PATH=$PATH:/home/opc/.nvm/versions/node/v20.15.1/bin /home/opc/.nvm/versions/node/v20.15.1/lib/node_modules/pm2/bin/pm2 startup systemd -u opc --hp /home/opc
    
  19. Run the output cmd by copy-paste

  20. try to access the server locally

        curl http://localhost:3003/createDb
          ->> you should see good result
        curl http://localhost:3001/
          ->> you should see html
    
  21. open the local Oracle linux firewall:

        sudo firewall-cmd --zone=public --permanent --add-port=3003/tcp
        sudo firewall-cmd --zone=public --permanent --add-port=3001/tcp
    
  22. commit the rules

        sudo firewall-cmd --reload
    

    If your using Ubuntu please follow this cheat sheet:https://bit.ly/OCI_OS_FW

  23. Go back to Chrome and navigate to: http://{public_instance_ip}:3001

  24. Upload a PDF file, run embed and enjoy exploring.

  25. With the trail account this setup can run for 30 days, until credits are expired. Please turn of the resources if you are not using it.