Web application that implements a Retrieval-Augmented Generation (RAG) backend system to analyse and compare two provided datasets of survey results. It makes use of a llama3.2 model running locally using ollama.
This repository is a monorepo containing multiple projects (e.g., frontend, backend, services).
This guide outlines the steps to deploy the entire monorepo locally on an AWS EC2 instance.
Ensure you have the following before starting the deployment:
- AWS EC2 Instance (Ubuntu recommended)
- SSH Access to the EC2 instance
- Git installed on the EC2 instance
- Python3 and pip installed on the EC2 instance
- Security group activated on the EC2 that allows all TCP connections (origin 0.0.0.0/0) to ports 3000 and 8000
Use SSH to access the EC2 instance. Replace your-key.pem and ec2-user@your-instance-ip with your actual key and instance details.
ssh -i "your-key.pem" ec2-user@your-instance-ipsudo apt update && sudo apt upgrade
curl -fsSL https://ollama.com/install.sh | shDownload the latest llama3.2 model.
ollama pull llama3.2Clone the repository:
git clone https://github.com/moisesmoalde/ins-ai-ghts.git
cd ins-ai-ghtsCreate a virtual environment, activate it and install requirements:
python3 -m venv .venv
echo "*" > .venv/.gitignoresource .venv/bin/activate
pip install -r backend/requirements.txtpython3 -m http.server -d frontend 3000In another terminal:
cd backend
python3 main.py[http://your-instance-ip:3000]