Ali Mohsin
commited on
Commit
·
ec8a465
1
Parent(s):
17977ea
feat: Enable headless rendering by setting PyOpenGL platform to EGL and listing required system packages.
Browse files- app.py +3 -0
- packages.txt +7 -0
app.py
CHANGED
|
@@ -11,6 +11,9 @@ from PIL import Image
|
|
| 11 |
import threading
|
| 12 |
from glob import glob
|
| 13 |
|
|
|
|
|
|
|
|
|
|
| 14 |
# --- Installation Helper ---
|
| 15 |
def install_dependencies():
|
| 16 |
print("Checking and installing dependencies...")
|
|
|
|
| 11 |
import threading
|
| 12 |
from glob import glob
|
| 13 |
|
| 14 |
+
# Set OpenGL Platform for headless rendering
|
| 15 |
+
os.environ["PYOPENGL_PLATFORM"] = "egl"
|
| 16 |
+
|
| 17 |
# --- Installation Helper ---
|
| 18 |
def install_dependencies():
|
| 19 |
print("Checking and installing dependencies...")
|
packages.txt
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
libgl1-mesa-glx
|
| 2 |
+
libegl1-mesa
|
| 3 |
+
libgles2-mesa
|
| 4 |
+
libglib2.0-0
|
| 5 |
+
libsm6
|
| 6 |
+
libxext6
|
| 7 |
+
libxrender-dev
|