Include general env.sh
Currently, we need to set in a unique way the cache and config directories for the different python packages involved in the processing. Right now the problematic ones are matplotlib, astropy and ctapipe.
This should be placed in an env_init.sh
and sourced before running the production.
export XDG_CACHE_HOME="/fefs/aswg/lstanalyzer/"
export XDG_CONFIG_HOME="/fefs/aswg/lstanalyzer/"
export CTAPIPE_SVC_PATH="/fefs/aswg/lstanalyzer/.ctapipe/service"
export CTAPIPE_CACHE="/fefs/aswg/lstanalyzer/.ctapipe/ctapipe_cache"
export MPLCONFIGDIR="/fefs/aswg/lstanalyzer/.cache/matplotlib"
See related issue #24 (closed). Note that exporting MPLCONFIGDIR
did not work for the observed data pipe:
Traceback (most recent call last):
File "/fefs/aswg/software/virtual_env/anaconda3/envs/osa/lib/python3.7/site-packages/matplotlib/font_manager.py", line 1429, in <module>
fontManager = json_load(_fmcache)
File "/fefs/aswg/software/virtual_env/anaconda3/envs/osa/lib/python3.7/site-packages/matplotlib/font_manager.py", line 1012, in json_load
with open(filename, 'r') as fh:
FileNotFoundError: [Errno 2] No such file or directory: '/fefs/aswg/data/mplconfig_cache/fontlist-v330.json'
During handling of the above exception, another exception occurred:
...
TimeoutError: Lock error: Matplotlib failed to acquire the following lock file:
/fefs/aswg/data/mplconfig_cache/fontlist-v330.json.matplotlib-lock
This maybe due to another process holding this lock file. If you are sure no
other Matplotlib process is running, remove this file and try again.
So we may want to be able either to set it or not rather than always export that directory.
Edited by Daniel Morcuende