Spaces:
Build error
Build error
File size: 1,450 Bytes
c3cba0a | 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 | # 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
|