SherryLiu пре 7 месеци
родитељ
комит
5f4e535b00
4 измењених фајлова са 48 додато и 30 уклоњено
  1. 2 19
      README.md
  2. 20 0
      README_docker.md
  3. 0 11
      docker-compose.yml
  4. 26 0
      run.sh

+ 2 - 19
README.md

@@ -1,19 +1,2 @@
-# RAG with TAIDE Model
-
-## Prerequisites
-- Docker and Docker Compose
-- Ollama (for creating the taide-local model)
-
-## Setting up taide-local
-
-1. Install Ollama on your VM 
-`curl -fsSL https://ollama.com/install.sh | sh`
-2. Create the taide-local model
-`ollama create taide-local -f Modelfile`
-
-## Running the Applciation
-1. Clone this repository.
-`git clone -b public https://github.com/yourusername/your-repo.git`
-2. Create a `.env` file in the project root with your API keys.
-3. Run `docker-compose up --build` 
-4. The application will be available at `http://localhost:8000`.
+run `chmod +x run.sh`
+run `./run.sh`

+ 20 - 0
README_docker.md

@@ -0,0 +1,20 @@
+# Run TAIDE RAG in VM
+
+## Prerequisites
+- Docker and Docker Compose
+- Ollama (for creating the taide-local model)
+- Download TAIDE .gguf file. https://huggingface.co/taide/TAIDE-LX-7B-Chat-4bit/tree/main?show_file_info=taide-7b-a.2-q4_k_m.gguf Update the file path in `Modelfile`
+
+## Setting up taide-local
+
+1. Install Ollama on your VM 
+`curl -fsSL https://ollama.com/install.sh | sh`
+2. Create the taide-local model
+`ollama create taide-local -f Modelfile`
+
+## Running the Applciation
+1. Clone this repository.
+`git clone -b public https://github.com/yourusername/your-repo.git`
+2. Create a `.env` file in the project root with your API keys.
+3. Run `docker-compose up --build` 
+4. The application will be available at `http://localhost:8000`.

+ 0 - 11
docker-compose.yml

@@ -1,11 +0,0 @@
-services:
-  app:
-    build: .
-    ports:
-      - "8081:8081"
-    environment:
-      - OPENAI_API_KEY=${OPENAI_API_KEY}
-      - SUPABASE_URL=${SUPABASE_URL}
-      - SUPABASE_KEY=${SUPABASE_KEY}
-    volumes:
-      - ./Documents:/app/Documents

+ 26 - 0
run.sh

@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# Environment
+conda create -n conda-env python=3.9
+conda activate conda-env
+pip install -r requirements.txt
+
+# Downloads
+git clone http://git.choozmo.com:3000/sherry/Systex.git
+wget https://huggingface.co/taide/TAIDE-LX-7B-Chat-4bit/resolve/main/taide-7b-a.2-q4_k_m.gguf
+curl https://ollama.ai/install.sh | sh
+
+# Build Taide model
+mkdir -p Modelfile
+mv taide-7b-a.2-q4_k_m.gguf Modelfile/
+ollama create taide-local -f Modelfile
+
+python RAG_app_copy.py
+
+# Make the script executable:
+# chmod +x run.sh
+
+# /answer2?question=解釋碳排放法規
+
+
+