Spaces:
Runtime error
Runtime error
Boning c
commited on
Create entrypoint.sh
Browse files- entrypoint.sh +19 -0
entrypoint.sh
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
|
| 3 |
+
# 1. Start Xvfb (headless X server)
|
| 4 |
+
Xvfb :1 -screen 0 1280x720x24 &
|
| 5 |
+
|
| 6 |
+
# 2. Export display for all GUI apps
|
| 7 |
+
export DISPLAY=:1
|
| 8 |
+
|
| 9 |
+
# 3. Launch a minimal window manager
|
| 10 |
+
fluxbox &
|
| 11 |
+
|
| 12 |
+
# 4. Start X11 VNC server (no password, persistent)
|
| 13 |
+
x11vnc -display :1 -nopw -forever -shared -rfbport 5901 &
|
| 14 |
+
|
| 15 |
+
# 5. Launch noVNC (serves on port 6080)
|
| 16 |
+
/usr/share/novnc/utils/launch.sh --vnc localhost:5901 --listen 6080 &
|
| 17 |
+
|
| 18 |
+
# 6. Finally, start the Gradio app
|
| 19 |
+
python3 /app.py
|