|
|
|
|
|
|
|
|
|
|
|
Write-Host "==================================" -ForegroundColor Cyan
|
|
|
Write-Host "Cancer@Home v2 - Windows Setup" -ForegroundColor Cyan
|
|
|
Write-Host "==================================" -ForegroundColor Cyan
|
|
|
Write-Host ""
|
|
|
|
|
|
|
|
|
Write-Host "Checking Python installation..." -ForegroundColor Yellow
|
|
|
try {
|
|
|
$pythonVersion = python --version 2>&1
|
|
|
Write-Host "β Python found: $pythonVersion" -ForegroundColor Green
|
|
|
} catch {
|
|
|
Write-Host "β Python not found. Please install Python 3.8+ from https://www.python.org/" -ForegroundColor Red
|
|
|
exit 1
|
|
|
}
|
|
|
|
|
|
|
|
|
Write-Host "Checking Docker installation..." -ForegroundColor Yellow
|
|
|
try {
|
|
|
$dockerVersion = docker --version 2>&1
|
|
|
Write-Host "β Docker found: $dockerVersion" -ForegroundColor Green
|
|
|
} catch {
|
|
|
Write-Host "β Docker not found. Please install Docker Desktop from https://www.docker.com/products/docker-desktop" -ForegroundColor Red
|
|
|
exit 1
|
|
|
}
|
|
|
|
|
|
|
|
|
Write-Host ""
|
|
|
Write-Host "Creating Python virtual environment..." -ForegroundColor Yellow
|
|
|
python -m venv venv
|
|
|
Write-Host "β Virtual environment created" -ForegroundColor Green
|
|
|
|
|
|
|
|
|
Write-Host ""
|
|
|
Write-Host "Installing Python dependencies..." -ForegroundColor Yellow
|
|
|
& ".\venv\Scripts\Activate.ps1"
|
|
|
pip install --upgrade pip
|
|
|
pip install -r requirements.txt
|
|
|
Write-Host "β Dependencies installed" -ForegroundColor Green
|
|
|
|
|
|
|
|
|
Write-Host ""
|
|
|
Write-Host "Creating directory structure..." -ForegroundColor Yellow
|
|
|
$dirs = @(
|
|
|
"data\gdc",
|
|
|
"data\boinc",
|
|
|
"data\processed\fastq",
|
|
|
"data\processed\blast",
|
|
|
"data\processed\variants",
|
|
|
"data\cache",
|
|
|
"logs"
|
|
|
)
|
|
|
|
|
|
foreach ($dir in $dirs) {
|
|
|
New-Item -ItemType Directory -Force -Path $dir | Out-Null
|
|
|
}
|
|
|
Write-Host "β Directories created" -ForegroundColor Green
|
|
|
|
|
|
|
|
|
Write-Host ""
|
|
|
Write-Host "Starting Neo4j database..." -ForegroundColor Yellow
|
|
|
docker-compose up -d
|
|
|
Start-Sleep -Seconds 10
|
|
|
Write-Host "β Neo4j started" -ForegroundColor Green
|
|
|
|
|
|
Write-Host ""
|
|
|
Write-Host "==================================" -ForegroundColor Cyan
|
|
|
Write-Host "Setup Complete!" -ForegroundColor Green
|
|
|
Write-Host "==================================" -ForegroundColor Cyan
|
|
|
Write-Host ""
|
|
|
Write-Host "To start the application:" -ForegroundColor Yellow
|
|
|
Write-Host " 1. Activate virtual environment: .\venv\Scripts\Activate.ps1" -ForegroundColor White
|
|
|
Write-Host " 2. Run the application: python run.py" -ForegroundColor White
|
|
|
Write-Host ""
|
|
|
Write-Host "Access points:" -ForegroundColor Yellow
|
|
|
Write-Host " - Application: http://localhost:5000" -ForegroundColor White
|
|
|
Write-Host " - Neo4j Browser: http://localhost:7474 (neo4j/cancer123)" -ForegroundColor White
|
|
|
Write-Host " - API Docs: http://localhost:5000/docs" -ForegroundColor White
|
|
|
Write-Host ""
|
|
|
|