-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·72 lines (58 loc) · 1.82 KB
/
setup.sh
File metadata and controls
executable file
·72 lines (58 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
# Setup script for WSL Runtime AI System
echo "Setting up WSL Runtime AI Orchestration System..."
echo "=================================================="
# Create necessary directories
echo "Creating directory structure..."
mkdir -p ~/.repository/wsl-runtime
mkdir -p ~/_/ai
mkdir -p ~/.repository/wsl-runtime/backups
mkdir -p ~/.repository/wsl-runtime/logs
# Install required packages
echo "Installing required packages..."
sudo apt-get update
sudo apt-get install -y sqlite3 jq curl bc
# Install Ollama if not present
if ! command -v ollama &> /dev/null; then
echo "Installing Ollama..."
curl -fsSL https://ollama.com/install.sh | sh
fi
# Start Ollama service
echo "Starting Ollama..."
ollama serve &
sleep 5
# Pull slim model
echo "Pulling Ollama slim model..."
ollama pull slim
# Make scripts executable
echo "Setting up scripts..."
chmod +x ~/_/ai/ai.sh
chmod +x ~/.repository/wsl-runtime/setup.sh
# Create systemd service for auto-start
echo "Creating system service..."
cat > ~/.config/systemd/user/wsl-ai.service << EOF
[Unit]
Description=WSL Runtime AI System
After=network.target
[Service]
Type=simple
ExecStart=/bin/bash -c "cd ~/.repository/wsl-runtime && python3 -m http.server 8080"
Restart=always
WorkingDirectory=%h/.repository/wsl-runtime
[Install]
WantedBy=default.target
EOF
# Initialize database
echo "Initializing database..."
~/_/ai/ai.sh status
# Create HTML file
echo "Creating HTML interface..."
# The HTML content should be copied to ~/.repository/wsl-runtime/index.html
echo "Setup complete!"
echo ""
echo "To start the system:"
echo "1. Start web server: cd ~/.repository/wsl-runtime && python3 -m http.server 8080"
echo "2. Open browser to: http://localhost:8080"
echo "3. Use AI system: ~/_/ai/ai.sh reason \"Your prompt here\""
echo ""
echo "System will be available at http://localhost:8080"