-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
matplotlib Warning About Temporary Files in /tmp #13
Comments
Are you using jobeinabox with CodeRunner or in some other context? If the latter, I'd be interested to know about it. Creating a permanently writable directory for matplotlib is one workaround but would open a security hole (students could share info via that directory) and would need a housekeeping task to clean up the contents after each run. Our standard workaround for this problem within CodeRunner is the following prefix code (after importing os):
Our template executes that code prior to an exec of the student answer. I possibly should consider moving this code into Jobe somehow. As you've discovered it's a bit tricky to configure environment variables on Jobe, as the runguard program I use to execute code cleans the environment before the run to plug various potential security holes. |
Hi Richard, we'll take a look at the fix you mentioned. We have been testing jobeinabox with Coderunner on Moodle. Just some small customisations to get additional python modules into the container. Thanks for the suggestion, |
We have been playing with jobinabox, everything has been going well so far, so a big thanks!
We had a minor issue with matplotlib complaining about the tmp location:
Matplotlib created a temporary config/cache directory at /tmp/matplotlib-79ubm2uq because the default path (/home/jobe00/.config/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
I dropped into the docker container and added /home/jobe00 and set it as writable for the user jobe00 which did resolve the warning message. When a questions get processed, it does create some tmp files as expected. I'm guessing this isn't the optimal solution here as we ideally want each runguard job to run without any cached files.
I thought I might be able to set
export MPLCONFIGDIR=/tmp
in bashrc or profile.d but this doesn't get picked when the runguard user jobe00 processes the job.Any guidance would be great, cheers!
The text was updated successfully, but these errors were encountered: