guydffdsdsfd commited on
Commit
064fce0
·
verified ·
1 Parent(s): 4a04142

Create start.sh

Browse files
Files changed (1) hide show
  1. start.sh +16 -0
start.sh ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # 1. Start the Python Guard Proxy in the background
4
+ # This opens port 7860 immediately so Hugging Face sees the Space as "Live"
5
+ python3 /home/user/app.py &
6
+
7
+ # 2. Start the Stable Diffusion CPU Server in the background
8
+ # We use a lightweight server (like fastsd-cpu or sd.cpp)
9
+ # Here we assume you're using a python-based server for the backend
10
+ python3 -m sd_backend_server --port 11434 --host 127.0.0.1 &
11
+
12
+ echo "Waiting for CPU Model to initialize..."
13
+ sleep 10
14
+
15
+ # 3. Keep the container alive
16
+ wait -n