Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • LSTOSA LSTOSA
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • cta-array-elements
  • lstlst
  • analysis
  • LSTOSALSTOSA
  • Issues
  • #48

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 Apr 02, 2021 by Daniel Morcuende
Assignee
Assign to
Time tracking