The nomad's appworker doesn't run outside of the nomad's root folder
running nomad appworker other place than the nomad's root folder fails:
$ nomad admin run appworker
-------------- celery@fekad-mbp2015.local v5.2.7 (dawn-chorus)
--- ***** -----
-- ******* ---- macOS-12.3.1-x86_64-i386-64bit 2023-11-13 17:23:49
- *** --- * ---
- ** ---------- [config]
- ** ---------- .> app: nomad.processing:0x125987310
- ** ---------- .> transport: amqp://rabbitmq:**@localhost:5672//
- ** ---------- .> results: disabled://
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
-------------- [queues]
.> celery exchange=celery(direct) key=celery
[tasks]
. nomad.app.resources.routers.resources.retrieve_resources
. nomad.processing.base.proc_task
INFO: Started server process [90059]
INFO: Waiting for application startup.
ERROR: Traceback (most recent call last):
File "/Users/fekad/Work/nomad-1549-notebook-plugin/.venv/lib/python3.9/site-packages/starlette/routing.py", line 671, in lifespan
async with self.lifespan_context(app):
File "/Users/fekad/Work/nomad-1549-notebook-plugin/.venv/lib/python3.9/site-packages/starlette/routing.py", line 566, in __aenter__
await self._router.startup()
File "/Users/fekad/Work/nomad-1549-notebook-plugin/.venv/lib/python3.9/site-packages/starlette/routing.py", line 648, in startup
await handler()
File "/Users/fekad/Work/nomad-1549-notebook-plugin/nomad/app/main.py", line 152, in startup_event
GuiFiles.gui_artifacts_data = get_gui_artifacts_js()
File "/Users/fekad/Work/nomad-1549-notebook-plugin/nomad/cli/dev.py", line 79, in get_gui_artifacts_js
'exampleUploads': _generate_example_upload_metadata(),
File "/Users/fekad/Work/nomad-1549-notebook-plugin/nomad/cli/dev.py", line 259, in _generate_example_upload_metadata
with open('examples/data/uploads/example_uploads.yml') as infile:
FileNotFoundError: [Errno 2] No such file or directory: 'examples/data/uploads/example_uploads.yml'
ERROR: Application startup failed. Exiting.
Expected: behaviour: The appworker should run independently what folder you are.