MetaCell / nwb-explorer

NWB Explorer is a web application to visualise and analyse the content of NWB:N 2 files
Other
24 stars 16 forks source link

Docker experiences #132

Closed arokem closed 4 years ago

arokem commented 4 years ago

Hello! This looks very useful.

I just tried launching this via Docker and wanted to report my experiences:

k8s (master)$docker run -it -p8888:8888 nwb-explorer
[W 2020-02-05 18:40:20.348 JupyterHub app:284] Failed to load jupyterhub.authenticators entrypoint 'local-mediawiki': AttributeError("module 'oauthenticator.mediawiki' has no attribute 'LocalMWOAuthenticator'",)
[E 2020-02-05 18:40:20.552 JupyterHub app:2458]
    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/dist-packages/jupyterhub/app.py", line 2455, in launch_instance_async
        await self.initialize(argv)
      File "/usr/local/lib/python3.6/dist-packages/jupyterhub/app.py", line 2077, in initialize
        self.load_config_file(self.config_file)
      File "</usr/local/lib/python3.6/dist-packages/decorator.py:decorator-gen-5>", line 2, in load_config_file
      File "/usr/local/lib/python3.6/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
        return method(app, *args, **kwargs)
      File "/usr/local/lib/python3.6/dist-packages/traitlets/config/application.py", line 598, in load_config_file
        raise_config_file_errors=self.raise_config_file_errors,
      File "/usr/local/lib/python3.6/dist-packages/traitlets/config/application.py", line 562, in _load_config_files
        config = loader.load_config()
      File "/usr/local/lib/python3.6/dist-packages/traitlets/config/loader.py", line 457, in load_config
        self._read_file_as_dict()
      File "/usr/local/lib/python3.6/dist-packages/traitlets/config/loader.py", line 489, in _read_file_as_dict
        py3compat.execfile(conf_filename, namespace)
      File "/usr/local/lib/python3.6/dist-packages/ipython_genutils/py3compat.py", line 198, in execfile
        exec(compiler(f.read(), fname, 'exec'), glob, loc)
      File "/srv/jupyterhub_config.py", line 20, in <module>
        c.ConfigurableHTTPProxy.api_url = 'http://{}:{}'.format(os.environ['PROXY_API_SERVICE_HOST'], int(os.environ['PROXY_API_SERVICE_PORT']))
      File "/usr/lib/python3.6/os.py", line 669, in __getitem__
        raise KeyError(key) from None
    KeyError: 'PROXY_API_SERVICE_HOST'
filippomc commented 4 years ago

Hi @arokem, sorry I see now the error in the instruction README. That k8s folder is meant for a deployment inside a Kubernetes cluster with jupyter hub. To run the application with Docker, the Dockerfile in the root folder is the one to use.

arokem commented 4 years ago

Thanks @filippomc ! Progress! See #133 for a fix.

Next issue is that http://localhost:8888/geppetto gives me a 404. I noticed in the terminal that I get the following text:

(nwb-explorer) nwb-explorer (master)$docker run -it -p8888:8888 nwb-explorer
[W 19:42:25.421 NotebookApp] Unrecognized alias: '--library=nwb_explorer', it will probably have no effect.
[I 19:42:25.437 NotebookApp] Writing notebook server cookie secret to /home/jovyan/.local/share/jupyter/runtime/notebook_cookie_secret
[W 19:42:25.670 NotebookApp] All authentication is disabled.  Anyone who can connect to this server will be able to run code.
[I 19:42:25.995 NotebookApp] Starting Geppetto Jupyter extension
[I 19:42:25.995 NotebookApp] Creating notebook notebook.ipynb
[I 19:42:26.001 NotebookApp] Geppetto Jupyter extension is running!
[I 19:42:26.293 NotebookApp] JupyterLab extension loaded from /opt/conda/lib/python3.7/site-packages/jupyterlab
[I 19:42:26.293 NotebookApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
[I 19:42:26.297 NotebookApp] Serving notebooks from local directory: /home/jovyan/nwb-explorer
[I 19:42:26.297 NotebookApp] The Jupyter Notebook is running at:
[I 19:42:26.297 NotebookApp] http://(e81fa291d87b or 127.0.0.1):8888/
[I 19:42:26.298 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

Which seems good, but when I go to http://127.0.0.1:8888/ I am asked to enter an authentication token and I don't know what the value of this token is (sometimes that appears in the URL, but not in this case; using e81fa291d87b did not do the trick). I also tried http://e81fa291d87b:8888/, based on the text above, but that didn't work either.

filippomc commented 4 years ago

Hi @arokem thanks for your patch! I checked it out and I found there was definitely a problem with packages that were updated since the dockerfile was released. I pushed the fix to the development branch, please let me know if that fixes your problems

pgleeson commented 4 years ago

Thanks for these tests @arokem. There is an open PR with documentation updates here: https://github.com/MetaCell/nwb-explorer/pull/126/files.

NWBE development/testing will increase a bit in the next few weeks and these and a few other issue should get ironed out. Please do add any other comments/issues you find, and feel free to test any NWB2 files you come across (of reasonable size ~<100MB) on the beta live instance http://nwbexplorer.opensourcebrain.org