| # startup.sh - BackgroundFX Pro startup script | |
| # Sets environment variables before Python starts to avoid libgomp errors | |
| # Set OpenMP threads BEFORE Python starts | |
| export OMP_NUM_THREADS=4 | |
| export MKL_NUM_THREADS=4 | |
| # Optional: Set other environment variables | |
| export PYTHONUNBUFFERED=1 | |
| export GRADIO_SERVER_NAME="0.0.0.0" | |
| export GRADIO_SERVER_PORT="7860" | |
| # Log the environment settings | |
| echo "===== BackgroundFX Pro Starting =====" | |
| echo "OMP_NUM_THREADS=$OMP_NUM_THREADS" | |
| echo "MKL_NUM_THREADS=$MKL_NUM_THREADS" | |
| echo "=================================" | |
| # Start the application | |
| python app.py |