The usual solution to this problem is to use xvfb to create a virtual
display, which works great in this situation when the display is not really
needed anyway. This is how we run the handin server headless and how all
the racket CI works.

Sam

On Sat, Jul 11, 2020, 12:26 PM Shriram Krishnamurthi <shri...@gmail.com>
wrote:

> I'm running headless Racket from a Docker container for auto-grading
> assignments in Gradescope.
>
> The students are writing BSL programs with 2htdp/image. This does not
> cause any problems for most of them.
>
> Two students, however, get an error in file loading with the error message
> in the subject line («Gtk initialization failed for display ":0"»).
>
> I finally localized the problem: it's because they are using the universe
> Teachpack.
>
> I don't know what in universe is causing this, but it seems rather weird
> that *image*, which is fundamentally graphical, does not cause this
> problem but *universe*, which is it fundamentally not, does.
>
> Furthermore, this dependency means that any program that depends on
> universe would likely not be able to be auto-graded (at least in a
> Gradescope-like headless context), which seems a rather severe restriction.
> (And ironic, given that the design of universe is to enable testing, and
> hence also auto-grading.) I don't know how Northeastern does auto-grading
> of universe that gets around this, but it's clearly in a different setting.
>
> I don't have a "question" because I seem to have identified the base issue
> here. This is mostly here for future reference, since I saw some posts from
> looking for that string that didn't answer my need (but were still useful
> in indicating it might be a dependency), so I'm leaving this here for a
> future person who might be searching.
>
> However, it would also be nice if the universe Teachpack could avoid this
> dependency entirely or refactor it into parts that do and don't need it.
>
> Shriram
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/7e2da814-25e5-4547-b5d9-2c66c087f37eo%40googlegroups.com
> <https://groups.google.com/d/msgid/racket-users/7e2da814-25e5-4547-b5d9-2c66c087f37eo%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAK%3DHD%2Bbac1M7NcL3RtGFdrC8G%2BsadT-J3mjXiWPe%3Do8t6pXDOQ%40mail.gmail.com.

Reply via email to