MogensR commited on
Commit
55df3a4
·
1 Parent(s): cb4d0ef

Create startup.sh

Browse files
Files changed (1) hide show
  1. startup.sh +21 -0
startup.sh ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # startup.sh - BackgroundFX Pro startup script
3
+ # Sets environment variables before Python starts to avoid libgomp errors
4
+
5
+ # Set OpenMP threads BEFORE Python starts
6
+ export OMP_NUM_THREADS=4
7
+ export MKL_NUM_THREADS=4
8
+
9
+ # Optional: Set other environment variables
10
+ export PYTHONUNBUFFERED=1
11
+ export GRADIO_SERVER_NAME="0.0.0.0"
12
+ export GRADIO_SERVER_PORT="7860"
13
+
14
+ # Log the environment settings
15
+ echo "===== BackgroundFX Pro Starting ====="
16
+ echo "OMP_NUM_THREADS=$OMP_NUM_THREADS"
17
+ echo "MKL_NUM_THREADS=$MKL_NUM_THREADS"
18
+ echo "================================="
19
+
20
+ # Start the application
21
+ python app.py