browserpilot / entrypoint.sh
ncolex's picture
Deploy BrowserPilot with NumPy fix (2.2.6)
c1f04cf verified
#!/bin/bash
set -e
echo "πŸš€ Starting BrowserPilot on Hugging Face Spaces..."
# Create outputs directory if it doesn't exist
mkdir -p /app/outputs
# Install dependencies if needed
if [ -f requirements.txt ]; then
echo "πŸ“¦ Installing Python dependencies..."
pip install -q --no-cache-dir -r requirements.txt
fi
# Check if GOOGLE_API_KEY is set
if [ -z "$GOOGLE_API_KEY" ]; then
echo "⚠️ WARNING: GOOGLE_API_KEY is not set!"
echo "Please add it in Settings β†’ Variables and secrets"
fi
# Check if DATABASE_URL is set (optional)
if [ -n "$DATABASE_URL" ]; then
echo "βœ… Database configured"
else
echo "ℹ️ DATABASE_URL not set - database features disabled"
fi
# Start the application
echo "🌐 Starting FastAPI server on port 8000..."
exec python -m uvicorn backend.main:app --host 0.0.0.0 --port 8000