update README.md
This commit is contained in:
parent
4f6ce6649d
commit
9c1146ebb5
1 changed files with 71 additions and 45 deletions
116
README.md
116
README.md
|
|
@ -1,56 +1,81 @@
|
|||
# RIoT AI setup
|
||||
# RIoT AI Setup Guide
|
||||
|
||||
This is an instruction on how to set up a mac from scratch.
|
||||
> Step-by-step instructions for setting up a Mac Mini from scratch.
|
||||
|
||||
## Install Homebrew
|
||||
---
|
||||
|
||||
## 1. Homebrew
|
||||
|
||||
```bash
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
```
|
||||
|
||||
Add Homebrew to your shell profile:
|
||||
|
||||
```bash
|
||||
echo >> /Users/riot/.zprofile
|
||||
echo 'eval "$(/opt/homebrew/bin/brew shellenv zsh)"' >> /Users/riot/.zprofile
|
||||
eval "$(/opt/homebrew/bin/brew shellenv zsh)"
|
||||
```
|
||||
|
||||
## Install Ollama
|
||||
---
|
||||
|
||||
`curl -fsSL https://ollama.com/install.sh | sh`
|
||||
## 2. Ollama
|
||||
|
||||
## Install Docker
|
||||
```bash
|
||||
curl -fsSL https://ollama.com/install.sh | sh
|
||||
```
|
||||
|
||||
`brew install --cask docker-desktop`
|
||||
---
|
||||
|
||||
`open -a Docker`
|
||||
## 3. Docker Desktop
|
||||
|
||||
Click through the install menu and if prompted, install software update.
|
||||
```bash
|
||||
brew install --cask docker-desktop
|
||||
open -a Docker
|
||||
```
|
||||
|
||||
### Adjust resources
|
||||
Click through the installer and install any prompted software updates.
|
||||
|
||||
Docker -> Settings -> Resources:
|
||||
### Adjust Resources
|
||||
|
||||
- CPU limit: MAX
|
||||
- Memory limi 20GB
|
||||
- Disk usage limit: MAX
|
||||
Go to **Docker → Settings → Resources** and set:
|
||||
|
||||
Then hit Apply & restart
|
||||
| Setting | Value |
|
||||
| ---------------- | ----- |
|
||||
| CPU limit | MAX |
|
||||
| Memory limit | 20 GB |
|
||||
| Disk usage limit | MAX |
|
||||
|
||||
## Install Onyx
|
||||
Hit **Apply & Restart**.
|
||||
|
||||
`curl -fsSL https://onyx.app/install_onyx.sh | bash`
|
||||
---
|
||||
|
||||
1. To acknowledge press Enter
|
||||
2. Choose 2 for standard
|
||||
3. Press Enter for edge
|
||||
## 4. Onyx
|
||||
|
||||
Onyx created a directory (~/onyx_data) in which you can find the docker compose to manually stop it or modify the images if needed. There is also a `.env` but we don't touch that since it is not necessary.
|
||||
```bash
|
||||
curl -fsSL https://onyx.app/install_onyx.sh | bash
|
||||
```
|
||||
|
||||
Disable sleeping for the mac mini `sudo pmset -a sleep 0 disksleep 0`
|
||||
When prompted:
|
||||
|
||||
## Set up ollama models
|
||||
1. Press **Enter** to acknowledge
|
||||
2. Choose **2** for Standard
|
||||
3. Press **Enter** for Edge
|
||||
|
||||
1. Clone this repo into home
|
||||
Onyx creates `~/onyx_data/`, which contains the Docker Compose file (useful for manually stopping or modifying images). There is also a `.env` file — leave it untouched.
|
||||
|
||||
### Prevent Sleep
|
||||
|
||||
```bash
|
||||
sudo pmset -a sleep 0 disksleep 0
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 5. Ollama Models
|
||||
|
||||
1. Clone the repo:
|
||||
|
||||
```bash
|
||||
cd ~
|
||||
|
|
@ -58,41 +83,42 @@ Disable sleeping for the mac mini `sudo pmset -a sleep 0 disksleep 0`
|
|||
cd ~/riotsecure
|
||||
```
|
||||
|
||||
2. Create models from modelfiles
|
||||
2. Create models from modelfiles:
|
||||
|
||||
```bash
|
||||
./updateModels.sh modelfiles
|
||||
```
|
||||
|
||||
The needed model is pulled automatically, you just need to wait until it's done.
|
||||
The required base model is pulled automatically — just wait for it to finish.
|
||||
|
||||
3. Navigate to the web-interface located on port `3000`.
|
||||
4. Make yourself an admin account
|
||||
5. Go to Admin Panel -> Language Models
|
||||
6. Select Ollama as a provider and give the provider a name.
|
||||
7. Set the API base URL to `http://host.docker.internal:11434`
|
||||
8. Refresh the models and select at least the three riot models and hit connect.
|
||||
9. Go to Admin Panel -> Chat Preferences -> System prompt -> Modify Prompt. Delete the whole prompt and Save.
|
||||
3. Open the web interface on port **3000** and create an admin account.
|
||||
4. Go to **Admin Panel → Language Models**:
|
||||
- Select **Ollama** as provider and give it a name
|
||||
- Set the API base URL to `http://host.docker.internal:11434`
|
||||
- Refresh the model list, select at least the three RIoT models, and click **Connect**
|
||||
5. Go to **Admin Panel → Chat Preferences → System Prompt → Modify Prompt**, delete the entire prompt, and save.
|
||||
|
||||
## Upload RAG files
|
||||
---
|
||||
|
||||
### Upload as file
|
||||
## 6. RAG Content Upload
|
||||
|
||||
1. If needed, adjust the urls in `riot-sources.txt`
|
||||
2. Run bash script to get json files
|
||||
### Option A — Upload as File
|
||||
|
||||
1. If needed, edit the URLs in `riot-sources.txt`.
|
||||
|
||||
2. Fetch content:
|
||||
|
||||
```bash
|
||||
cd ~/riotsecure
|
||||
./fetchContent.sh riot-sources.txt
|
||||
```
|
||||
|
||||
3. Go to the web-interface -> Admine Panel -> Add Connector -> File
|
||||
4. Give the connector a name and upload the files from `~/riotsecure/content`
|
||||
5. Give it a few seconds ~30 until it finished indexing.
|
||||
3. In the web interface, go to **Admin Panel → Add Connector → File**.
|
||||
4. Give the connector a name and upload the files from `~/riotsecure/content`.
|
||||
5. Wait ~30 seconds for indexing to complete.
|
||||
|
||||
### Upload as URL
|
||||
### Option B — Upload as URL
|
||||
|
||||
1. Go to the web-interface -> Admine Panel -> Add Connector -> Web
|
||||
2. Add every single needed URL as a connector
|
||||
3. For each URL choose the scrape method `single`
|
||||
4. Give it a few seconds ~30 until it finished indexing.
|
||||
1. In the web interface, go to **Admin Panel → Add Connector → Web**.
|
||||
2. Add each URL as a separate connector, using scrape method **Single**.
|
||||
3. Wait ~30 seconds for indexing to complete.
|
||||
|
|
|
|||
Loading…
Reference in a new issue