omero-py
omero-py copied to clipboard
omero import: set java.io.tmpdir to gettempdir()
Fixes #485
Summary
This changes set the Java process launched by the omero import utility to work in environments where the default Java temporary directory, usually /tmp/, is mounted with noexec permissions.
The proposed implementation makes use of the built-in OMERO.py temporary directory utility. This should allow the propose solution to be portable and cover scenarios ranging from in-place imports where the import is on the same environment and using the same service user as OMERO.server to client imports which might happen in a different environment and/or operating system and/or as a different user.
Testing
To reproduce the original issue
- set-up an environment where
/tmpis mounted asnoexec - select an image that requires Java/Bio-Formats to use a native library e.g. CMU-1.ndpi
- check that
omero import -f CMU-1.ndpidoes not find any import candidate and reports an ERROR about the inability to load Turbo JPEG
Using a version of OMERO.py with these changes included
- check
omero import -f CMU-1.ndpidetects the NDPI file in the same environment as above - check
omero import CMU-1.ndpisuccessfully imports the NDPI file - during the import, check that a subfolder under
~/omero/tmpis created for the process with the native libraries - on import completion, check the temporary subfolder is cleaned up
- ideally, run the import tests above both for in-place imports and non-inplace imports