#!/bin/bash set -e # Create the virtual environment if it doesn't exist if [ ! -d "/voicebot/.venv/bin" ]; then echo "Creating virtual environment..." if [ -e /voicebot/pyproject.toml ]; then rm -r /voicebot/pyproject.toml fi uv init \ --python /usr/bin/python3.13 \ --name "ai-voicebot-agent" \ --description "AI Voicebot Environment" \ . uv add -r ./requirements.txt fi export VIRTUAL_ENV=/voicebot/.venv export PATH="$VIRTUAL_ENV/bin:$PATH" # Launch voicebot in production or development mode if [ "$PRODUCTION" != "true" ]; then echo "Starting voicebot in development mode with auto-reload..." # Fix: Use single --watch argument with multiple paths instead of multiple --watch arguments python3 -u scripts/reload_runner.py --watch . /shared --verbose --interval 0.5 -- uv run main.py \ --insecure \ --server-url https://ketrenos.com/ai-voicebot \ --lobby default \ --session-name "Python Voicebot" \ --password "v01c3b0t" else echo "Starting voicebot in production mode..." exec uv run main.py \ --server-url https://ai-voicebot.ketrenos.com \ --lobby default \ --session-name "Python Voicebot" \ --password "v01c3b0t" fi