Spaces:
Sleeping
Sleeping
Adarsh Kumar commited on
Delete entrypoint.sh
Browse files12345678910111213141516171819202122232425262728293031323334353637383940414243444546#!/usr/bin/env bashset -euo pipefail
echo "[entrypoint] starting up"
mkdir -p /tmp/.X11-unixchmod 1777 /tmp/.X11-unix 2>/dev/null || true
pkill -x Xvfb 2>/dev/null || truerm -f /tmp/.X11-unix/X99 2>/dev/null || true
echo "[entrypoint] starting Xvfb on :99"Xvfb :99 -screen 0 1280x720x24 \ -ac \ +extension GLX \ +extension RANDR \ +render \ -noreset \ -nolisten tcp >/tmp/xvfb.log 2>&1 &
XVFB_PID=$!
cleanup() { echo "[entrypoint] shutting down" kill "$XVFB_PID" 2>/dev/null || true wait "$XVFB_PID" 2>/dev/null || true}trap cleanup SIGTERM SIGINT EXIT
for i in $(seq 1 40); do if xdpyinfo -display :99 >/dev/null 2>&1; then echo "[entrypoint] display :99 is ready" break fi if ! kill -0 "$XVFB_PID" >/dev/null 2>&1; then echo "[entrypoint] Xvfb died early" cat /tmp/xvfb.log || true exit 1 fi sleep 0.5done
export DISPLAY=:99echo "[entrypoint] DISPLAY=$DISPLAY"
exec python -u server.pyentrypoint.shDeleted-46