-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.ps1
More file actions
63 lines (52 loc) · 2.38 KB
/
Copy pathsetup.ps1
File metadata and controls
63 lines (52 loc) · 2.38 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
Write-Host "========================================" -ForegroundColor Cyan
Write-Host " Agentic AI Workflow - DragAI Setup" -ForegroundColor Cyan
Write-Host "========================================" -ForegroundColor Cyan
Write-Host ""
Write-Host "[1/5] Creating environment file..." -ForegroundColor Yellow
if (-not (Test-Path ".env")) {
Copy-Item ".env.example" ".env"
Write-Host "Environment file created. Please edit .env with your API keys." -ForegroundColor Green
} else {
Write-Host "Environment file already exists." -ForegroundColor Green
}
Write-Host ""
Write-Host "[2/5] Setting up Backend..." -ForegroundColor Yellow
Set-Location backend
if (-not (Test-Path "venv")) {
Write-Host "Creating Python virtual environment..." -ForegroundColor Blue
python -m venv venv
}
Write-Host "Activating virtual environment..." -ForegroundColor Blue
& "venv\Scripts\Activate.ps1"
Write-Host "Installing Python dependencies..." -ForegroundColor Blue
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
Write-Host ""
Write-Host "[3/5] Setting up Frontend..." -ForegroundColor Yellow
Set-Location ..\frontend
Write-Host "Clearing npm cache..." -ForegroundColor Blue
npm cache clean --force
Write-Host "Installing Node.js dependencies with legacy peer deps..." -ForegroundColor Blue
npm install --legacy-peer-deps
Write-Host ""
Write-Host "[4/5] Creating necessary directories..." -ForegroundColor Yellow
Set-Location ..
$directories = @("models", "deployments", "logs", "data", "notebooks")
foreach ($dir in $directories) {
if (-not (Test-Path $dir)) {
New-Item -ItemType Directory -Path $dir
Write-Host "Created directory: $dir" -ForegroundColor Green
}
}
Write-Host ""
Write-Host "[5/5] Setup complete!" -ForegroundColor Green
Write-Host ""
Write-Host "========================================" -ForegroundColor Cyan
Write-Host " Next Steps:" -ForegroundColor Cyan
Write-Host "========================================" -ForegroundColor Cyan
Write-Host "1. Edit .env file with your API keys" -ForegroundColor White
Write-Host "2. Run: .\start-backend.bat (in new terminal)" -ForegroundColor White
Write-Host "3. Run: .\start-frontend.bat (in new terminal)" -ForegroundColor White
Write-Host "4. Open: http://localhost:3000" -ForegroundColor White
Write-Host "========================================" -ForegroundColor Cyan
Read-Host "Press Enter to continue"