The source code and dockerfile for the GSW2024 AI Lab.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

26 lines
484 B

4 weeks ago
  1. #!/bin/bash
  2. # This script is the entrypoint for our Docker image.
  3. set -ex
  4. # Set up display; otherwise rendering will fail
  5. Xvfb -screen 0 1024x768x24 &
  6. export DISPLAY=:0
  7. # Wait for the file to come up
  8. display=0
  9. file="/tmp/.X11-unix/X$display"
  10. for i in $(seq 1 10); do
  11. if [ -e "$file" ]; then
  12. break
  13. fi
  14. echo "Waiting for $file to be created (try $i/10)"
  15. sleep "$i"
  16. done
  17. if ! [ -e "$file" ]; then
  18. echo "Timing out: $file was not created"
  19. exit 1
  20. fi
  21. exec "$@"