Spaces:
Build error
Build error
Create start.sh
Browse files
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
|