Skip to content

forkless/ai-ai-ai

Repository files navigation

Ai, ai, ai! Bootstrap v0.1.5

⚠️ WARNING: These scripts are functional but far from ready for general use. You may encounter rough edges, incomplete error handling, or sharp corners. Proceed at your own risk.

⚠️ AMD RX 7000 Series and Newer Users: Driver 26.3.1 is recommended for stability across all workloads — ROCm, desktop productivity, and gaming. Some users report instability with 26.5.x and newer. See KNOWN_ISSUES.md for details.

Provision a structured local AI workstation on Windows in three scripts. Models, runtimes, config, workspace, tools, and caches each get their own layer — no duplication, safe reinstalls, no lost models.

D:\AI\
├── AI_CONFIG\     settings, model registry, port config
├── AI_CORE\       runtimes (ComfyUI, Ollama, Open Web UI)
├── AI_VAULT\      permanent models (single source of truth)
├── AI_WORKSPACE\  input, output, workflows
├── AI_TOOLS\      helper scripts, launchers, utilities
└── AI_CACHE\      temp data (safe to delete anytime)

Core principle: models live once in the vault. Every runtime consumes them through a symlink binding layer. Reinstall any tool without touching your data.

Requirements

  • Windows 10 or 11
  • PowerShell 5+
  • Administrator rights (for 2-deps.ps1)

Quick Start

  1. Download and unzip the latest release — you'll get a scripts/ folder with the four bootstrap scripts.

  2. Open PowerShell in the unzipped folder and run:

# Allow local scripts
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

# Unblock downloaded files (if downloaded from the web)
Get-ChildItem *.ps1 | Unblock-File

# Step 1 — create folders, symlinks, config
.\scripts\1-init.ps1

# Restart PowerShell

# Step 2 — install Git, Python, Ollama, FFmpeg
.\scripts\2-deps.ps1

# Restart PowerShell

# Step 3 — install apps (ComfyUI + Open Web UI)
.\scripts\3-apps.ps1

# Make the ai command available everywhere
.\scripts\ai.ps1 setup path

Daily Use

Command What it does
ai start all Start all services
ai stop all Stop all services
ai restart all Restart all services
ai status Dashboard — running services, ports, model counts
ai doctor Full system diagnostics
ai list List installed models by category
ai install all Install or update everything
ai install <service> Install or update comfyui, comfyui-manager, ollama, openwebui
ai watch <service> Live-tail service logs (comfyui, ollama, openwebui)
ai setup ports Change service ports
ai setup env Check and fix environment variables
ai clean cache Free up disk space — pin models to AI_VAULT first (HF, PyTorch, ComfyUI temp, logs)

Tip: Due to the nature of ComfyUI's frequent release cycle, running ai install comfyui (or ai install all) periodically pulls the latest version and updates dependencies. Most issues resolve with an update.

If a service doesn't appear to start, run its launcher directly in a visible PowerShell window to see real-time output:

D:\AI\AI_TOOLS\launch_comfyui.ps1

Or use ai watch <service> in a second window while starting.

Scripts

Script Purpose
scripts/1-init.ps1 Creates folder structure, detects GPU, sets up symlinks, writes config files
scripts/2-deps.ps1 Installs Git, Python 3.10/3.11, Ollama, FFmpeg via winget. Sets environment variables
scripts/3-apps.ps1 Installs ComfyUI + Open Web UI (clone, venv, model paths, launchers). GPU-aware backend selection
scripts/ai.ps1 Daily driver CLI — service management, status, diagnostics, model listing, cache cleanup, environment setup

GPU / CPU Support

The scripts detect your GPU and install the correct backend automatically:

  • NVIDIA — CUDA (via standard torch)
  • AMD — DirectML or ROCm. DirectML is the default compatible backend; ROCm (native PyTorch, Python 3.12) is available for faster inference on AMD GPUs with driver 26.2.2+. Select during install or pass --switch rocm. ROCm supports RDNA2+ (RX 6000/7000/9000 series); RX 5000 series uses DirectML. See COMPATIBILITY.md for details.
  • Intel CPU / no GPU — CPU-only fallback (PyTorch without CUDA or DirectML). Slow but functional.

Port Configuration

Service Default Port
Ollama 11434
ComfyUI 8188
Open Web UI 3000

Change with ai setup ports. Settings persist in AI_CONFIG\ports.json.

Environment Variables

The scripts redirect download caches away from the vault:

Variable Points To Purpose
OLLAMA_MODELS AI_VAULT\models\llm Ollama model storage
HF_HOME AI_CACHE\huggingface Hugging Face downloads
TORCH_HOME AI_CACHE\torch PyTorch cache

Check and fix with ai setup env.

Architecture

The 6-layer structure separates configuration, runtimes, assets, workspace, tools, and caches into independent layers:

AI_CONFIG\     — centralized configuration and model registry
AI_CORE\       — AI runtimes and applications
AI_VAULT\      — permanent models (LLMs, diffusion, embeddings, CLIP)
AI_WORKSPACE\  — user files (input, output, workflows)
AI_TOOLS\      — helper scripts and utilities
AI_CACHE\      — temporary downloads, caches, and logs (safe to delete)

A symlink binding layer at AI_CORE\_bindings routes model requests from runtimes to AI_VAULT\models\, keeping the vault as the single source of truth.

Documentation

License

MIT

About

Native Windows AMD AI Stack boostrap scripts using PowerShell for simple installation

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors