In my algorithms course, we plan to transition to using Julia this fall, and we are currently trying to make it work with INGInious, a system that automatically runs and tests code or code fragments submitted by students, using Docker containers. The main issue we keep facing is giving Julia access to the files it wants – primarily the
~/.julia directory. We’ve managed to solve this by setting
HOME to a directory where the process has read and write access, which solves some problems. For example, we are now allowed to use the ordinary
using mechanism (not possible before we adjusted
HOME), as the relevant calls to
stat seem to be permitted. And I guess this would also permit compilation caching of any modules the students wrote themselves and submitted. However, we’d also want to install external modules for the students to use – so I guess a pre-populated
.julia directory would have to be copied into the relevant directory/container for each run?
We could place it in a shared directory with no write access, but that would prevent the students from precompiling their own modules. Possibly not a real issue (we’re mostly talking small code fragments here anyway), but it doesn’t seem ideal. It would be great if we could have multiple locations – one with precompiled globally installed/shared modules and one with the compiler cache for the local code of the students themselves. I haven’t seen any such functionality in
Pkg3, but maybe I missed something? (I guess the reason this works for, e.g., Python is that it caches the compiled files alongside the source.)
Does anyone else have any experience with running Julia in a related context? Are there any other issue to consider (and any relevant solutions)?