diff --git a/README.md b/README.md index e501b57..6bdc9d0 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ When prompted: 2. Choose **2** for Standard 3. Press **Enter** for Edge -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. +Onyx creates `~/riotsecure/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 diff --git a/check-status.sh b/check-status.sh index 2963a48..a42e12c 100755 --- a/check-status.sh +++ b/check-status.sh @@ -158,12 +158,12 @@ fi # ============================================================================= print_section "Onyx" -if [ -d ~/onyx_data ]; then +if [ -d ~/riotsecure/onyx_data ]; then echo -e "$PASS Onyx data directory exists" # Check if Onyx containers are running if command -v docker &> /dev/null && docker info &> /dev/null; then - cd ~/onyx_data 2>/dev/null + cd ~/riotsecure/onyx_data 2>/dev/null if [ -f "docker-compose.yaml" ] || [ -f "docker-compose.yml" ]; then echo -e "$PASS Docker Compose file found" @@ -174,7 +174,7 @@ if [ -d ~/onyx_data ]; then docker ps --filter "name=onyx" --format " $INFO {{.Names}} ({{.Status}})" else echo -e "$WARN No Onyx containers running" - echo -e " ${INFO} Start with: cd ~/onyx_data && docker compose up -d" + echo -e " ${INFO} Start with: cd ~/riotsecure/onyx_data && docker compose up -d" OVERALL_STATUS=1 fi fi @@ -258,7 +258,7 @@ else echo "Common fixes:" echo " • Docker not running → Open Docker Desktop" echo " • Ollama not running → Run: ollama serve" - echo " • Onyx not running → cd ~/onyx_data && docker compose up -d" + echo " • Onyx not running → cd ~/riotsecure/onyx_data && docker compose up -d" echo " • Low disk space → Free up disk space" echo "" exit 1 diff --git a/setup.sh b/setup.sh index 460780a..649019e 100755 --- a/setup.sh +++ b/setup.sh @@ -179,9 +179,28 @@ else fi # ============================================================================= -# STEP 3: Docker Desktop +# STEP 3: Clone Repository # ============================================================================= -print_step "STEP 3: Installing Docker Desktop" +print_step "STEP 3: Setting up Repository" + +# Clone or update the repository first, as Onyx will be installed here +if [ -d ~/riotsecure ]; then + print_warning "riotsecure directory already exists" + cd ~/riotsecure + git pull + print_success "Repository updated" +else + print_warning "Cloning riotsecure repository..." + cd ~ + git clone https://github.com/cediackermann/riotsecure.git + cd ~/riotsecure + print_success "Repository cloned" +fi + +# ============================================================================= +# STEP 4: Docker Desktop +# ============================================================================= +print_step "STEP 4: Installing Docker Desktop" if [ -d "/Applications/Docker.app" ]; then print_success "Docker Desktop is already installed" @@ -220,11 +239,11 @@ done print_success "Docker is ready" # ============================================================================= -# STEP 4: Onyx +# STEP 5: Onyx # ============================================================================= -print_step "STEP 4: Installing Onyx" +print_step "STEP 5: Installing Onyx" -if [ -d ~/onyx_data ]; then +if [ -d ~/riotsecure/onyx_data ]; then print_warning "Onyx data directory already exists. Skipping installation." else print_warning "Installing Onyx..." @@ -234,6 +253,9 @@ else echo " 3. Press ENTER for Edge" echo "" + # Ensure we're in the riotsecure directory so onyx_data is created there + cd ~/riotsecure + # Download and run Onyx installer # Note: The interactive prompts need to be handled by the user curl -fsSL https://onyx.app/install_onyx.sh | bash @@ -247,25 +269,12 @@ sudo pmset -a sleep 0 disksleep 0 print_success "Sleep prevention configured" # ============================================================================= -# STEP 5: Ollama Models +# STEP 6: Ollama Models # ============================================================================= -print_step "STEP 5: Setting up Ollama Models" +print_step "STEP 6: Setting up Ollama Models" -# Check if we're already in the riotsecure directory -if [ ! -f "./updateModels.sh" ]; then - if [ -d ~/riotsecure ]; then - print_warning "riotsecure directory already exists" - cd ~/riotsecure - git pull - else - print_warning "Cloning riotsecure repository..." - cd ~ - git clone https://github.com/cediackermann/riotsecure.git - cd ~/riotsecure - fi -else - print_success "Already in riotsecure directory" -fi +# Ensure we're in the riotsecure directory +cd ~/riotsecure print_warning "Creating Ollama models from modelfiles..." if [ -f "./updateModels.sh" ]; then @@ -277,9 +286,9 @@ else fi # ============================================================================= -# STEP 6: Web Interface Configuration +# STEP 7: Web Interface Configuration # ============================================================================= -print_step "STEP 6: Web Interface Configuration" +print_step "STEP 7: Web Interface Configuration" echo "" echo "MANUAL STEPS REQUIRED:" @@ -299,9 +308,9 @@ echo "" wait_for_user # ============================================================================= -# STEP 7: RAG Content Upload +# STEP 8: RAG Content Upload # ============================================================================= -print_step "STEP 7: RAG Content Upload" +print_step "STEP 8: RAG Content Upload" echo "Choose content upload method:" echo " A - Upload as File (recommended)" @@ -372,8 +381,8 @@ fi echo "" echo "Useful commands:" -echo " - View Onyx logs: cd ~/onyx_data && docker compose logs -f" -echo " - Restart Onyx: cd ~/onyx_data && docker compose restart" +echo " - View Onyx logs: cd ~/riotsecure/onyx_data && docker compose logs -f" +echo " - Restart Onyx: cd ~/riotsecure/onyx_data && docker compose restart" echo " - List Ollama models: ollama list" echo " - Update Ollama models: cd ~/riotsecure && ./updateModels.sh modelfiles" echo ""