Open ka-sarthak opened 1 month ago
After working with @blueraft, we found a fix for this issue in my locally hosted oasis. In the configs/nomad.yaml
change the api_host
from localhost
to nomad_oasis_proxy
:
services:
api_host: 'nomad_oasis_proxy'
api_base_path: '/nomad-oasis'
With this change, the nomad-lab inside the JupyterHub will have nomad.client.url
as http://nomad_oasis_proxy/nomad-oasis/api
from nomad.config import config
url = config.client.url
print(url) ## output: http://nomad_oasis_proxy/nomad-oasis/api
Using ArchiveQuery
with this URL works without errors.
Keep in mind, after making the above changes to the configs/nomad.yaml
you need to create a new oasis image.
When making API calls in JupyterHub on the oasis, the
nomad.config.client.url
containinglocalhost
keyword does not work.localhost
has to be replaced with the IP address for successful call.This piece of code leads to an error append below.
However, replacing the URL with this resolves the issue:
Perhaps, some config that connects the localhost with the IP address is not being picked. I also raised this issue previously here: https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR/-/issues/1968
Error: