-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.ps1
More file actions
75 lines (65 loc) · 2.53 KB
/
setup.ps1
File metadata and controls
75 lines (65 loc) · 2.53 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
73
74
75
# DeepResearch Agent v2.0 - Setup Script (PowerShell)
Write-Host "🚀 Setting up DeepResearch Agent v2.0..." -ForegroundColor Green
# Check prerequisites
Write-Host "📋 Checking prerequisites..." -ForegroundColor Yellow
try {
$null = Get-Command node -ErrorAction Stop
Write-Host "✅ Node.js found" -ForegroundColor Green
} catch {
Write-Host "❌ Node.js is required but not installed." -ForegroundColor Red
exit 1
}
try {
$null = Get-Command python -ErrorAction Stop
Write-Host "✅ Python found" -ForegroundColor Green
} catch {
Write-Host "❌ Python 3.11+ is required but not installed." -ForegroundColor Red
exit 1
}
try {
$null = Get-Command docker -ErrorAction Stop
Write-Host "✅ Docker found" -ForegroundColor Green
} catch {
Write-Host "❌ Docker is required but not installed." -ForegroundColor Red
exit 1
}
# Copy environment template
if (-Not (Test-Path .env)) {
Write-Host "📝 Creating .env file from template..." -ForegroundColor Yellow
Copy-Item .env.example .env
Write-Host "✅ .env file created" -ForegroundColor Green
} else {
Write-Host "⚠️ .env file already exists, skipping..." -ForegroundColor Yellow
}
# Install Node.js dependencies
Write-Host "📦 Installing Node.js dependencies..." -ForegroundColor Yellow
npm install
# Create Python virtual environment
if (-Not (Test-Path "src\backend\.venv")) {
Write-Host "🐍 Creating Python virtual environment..." -ForegroundColor Yellow
Set-Location src\backend
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
Set-Location ..\..
Write-Host "✅ Python virtual environment created" -ForegroundColor Green
} else {
Write-Host "⚠️ Python virtual environment already exists, skipping..." -ForegroundColor Yellow
}
# Build Docker sandbox image
Write-Host "🐳 Building Docker sandbox image..." -ForegroundColor Yellow
docker build -f docker\sandbox-python.Dockerfile -t deepresearch-sandbox:latest .
Write-Host ""
Write-Host "✅ Setup complete!" -ForegroundColor Green
Write-Host ""
Write-Host "📚 Next steps:" -ForegroundColor Cyan
Write-Host " 1. Start services: docker-compose up -d"
Write-Host " 2. View architecture: npm run likec4"
Write-Host " 3. Start backend: npm run backend"
Write-Host " 4. Start desktop app: npm run dev"
Write-Host ""
Write-Host "🔗 URLs:" -ForegroundColor Cyan
Write-Host " - API: http://localhost:8000"
Write-Host " - API Docs: http://localhost:8000/docs"
Write-Host " - Architecture: http://localhost:4040"
Write-Host ""