# Build and run the Infinity Doctor Docker image # Usage: ./run_docker.ps1 # Check if .env file exists if (Test-Path -Path ".env") { Write-Host "Found .env file. Using environment variables from file." } else { Write-Host "No .env file found. Creating sample .env file..." @" # Infinity Doctor Environment Variables # Please fill in your API keys below GROQ_API_KEY=your_groq_api_key_here ELEVENLABS_API_KEY=your_elevenlabs_api_key_here "@ | Out-File -FilePath ".env" Write-Host "Sample .env file created. Please edit it with your actual API keys before running." Write-Host "Press any key to continue..." $null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") } # Create directories if they don't exist if (-Not (Test-Path -Path "./images")) { New-Item -Path "./images" -ItemType Directory Write-Host "Created images directory." } if (-Not (Test-Path -Path "./audio_data")) { New-Item -Path "./audio_data" -ItemType Directory Write-Host "Created audio_data directory." } # Build the Docker image Write-Host "Building Docker image..." docker build -t infinity-doctor . # Run the Docker container Write-Host "Running Docker container..." docker run --rm -p 7860:7860 ` --env-file .env ` -v ${PWD}/images:/app/images ` -v ${PWD}/audio_data:/app/audio_data ` infinity-doctor # Note: Add the following parameters if you need to expose CUDA to the container for GPU acceleration # --gpus all