diff --git a/.dockerignore b/.dockerignore index ea6c2dbd72f876115c47b902350976cac795dc8e..d0d9e8e37c4840a9cd49cc90b21142ba7f6c80f6 100644 --- a/.dockerignore +++ b/.dockerignore @@ -43,6 +43,9 @@ gui/public/env.js # Ignore built gui and docs artufacts nomad/app/static/ +# Ignore files created at nomad runtime +run/ + nomad/normalizing/data/*.db nomad/normalizing/data/*.msg diff --git a/.gitignore b/.gitignore index d8c2908d17f6623f91c1bbceee6ac7d57a2ceec1..98aad82dcb783db470fbf0558ae087d682e35af1 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,9 @@ bundles examples/workdir/ examples/data/uploads/*.zip +# Ignore files created at nomad runtime +run/ + # Side effect of running Jupyterhub locally jupyterhub_cookie_secret jupyterhub.sqlite diff --git a/nomad/app/main.py b/nomad/app/main.py index 1ca2109cd984ef526f643d02a75462e5e5b9019f..e411b14dd0cb548d442bb98338f3d10cedba0cc6 100644 --- a/nomad/app/main.py +++ b/nomad/app/main.py @@ -91,7 +91,9 @@ gui_folder = os.path.abspath(os.path.join(os.path.dirname(__file__), 'static/gui if not os.path.exists(gui_folder): os.makedirs(gui_folder) -configured_gui_folder = os.path.join(gui_folder, '../.gui_configured') +configured_gui_folder = os.path.join( + config.fs.working_directory, 'run', 'gui_configured' +) if os.path.exists(configured_gui_folder): gui_folder = configured_gui_folder diff --git a/nomad/cli/admin/run.py b/nomad/cli/admin/run.py index c19061686774f2eae73cfda1b184dab2fccef855..6321be36138d22e55df23b4333aadbf9c7c6caf8 100644 --- a/nomad/cli/admin/run.py +++ b/nomad/cli/admin/run.py @@ -101,6 +101,7 @@ def run_app( config.meta.service = 'app' if with_gui: + import os import os.path import glob import shutil @@ -108,7 +109,11 @@ def run_app( gui_folder = os.path.abspath( os.path.join(os.path.dirname(__file__), '../../app/static/gui') ) - run_gui_folder = os.path.join(gui_folder, '../.gui_configured') + run_gui_folder = os.path.join( + config.fs.working_directory, 'run', 'gui_configured' + ) + if not os.path.exists(run_gui_folder): + os.makedirs(run_gui_folder) # copy shutil.rmtree(run_gui_folder, ignore_errors=True)