limuyu011 commited on
Commit
c453225
·
verified ·
1 Parent(s): 6b03783

Upload vgl.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. vgl.sh +24 -0
vgl.sh ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash -e
2
+
3
+ rm -rf /tmp/.X*
4
+ export PATH="${PATH}:/opt/VirtualGL/bin"
5
+ export LD_LIBRARY_PATH="/usr/lib/libreoffice/program:${LD_LIBRARY_PATH}"
6
+
7
+ # /etc/init.d/dbus start
8
+
9
+ export DISPLAY=":1"
10
+ Xvfb "${DISPLAY}" -ac -screen "0" "1920x1200x24" -dpi "72" +extension "RANDR" +extension "GLX" +iglx +extension "MIT-SHM" +render -nolisten "tcp" -noreset -shmem &
11
+
12
+ # Wait for X11 to start
13
+ echo "Waiting for X socket"
14
+ until [ -S "/tmp/.X11-unix/X${DISPLAY/:/}" ]; do sleep 1; done
15
+ echo "X socket is ready"
16
+
17
+ #export VGL_DISPLAY="/dev/dri/card0"
18
+ export VGL_DISPLAY="egl"
19
+ export VGL_REFRESHRATE="$REFRESH"
20
+
21
+ echo "Session Running."
22
+
23
+ "$@"
24
+