Closed h3ndrk closed 6 years ago
If someone is curious why I included the --ip=
flag: I'm getting this error when starting up:
root@e7b5a360617a:~# jupyter notebook
Traceback (most recent call last):
File "/usr/local/bin/jupyter-notebook", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/jupyter_core/application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "<decorator-gen-7>", line 2, in initialize
File "/usr/local/lib/python3.5/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/notebook/notebookapp.py", line 1368, in initialize
self.init_webapp()
File "/usr/local/lib/python3.5/dist-packages/notebook/notebookapp.py", line 1188, in init_webapp
self.http_server.listen(port, self.ip)
File "/usr/local/lib/python3.5/dist-packages/tornado/tcpserver.py", line 142, in listen
sockets = bind_sockets(port, address=address)
File "/usr/local/lib/python3.5/dist-packages/tornado/netutil.py", line 197, in bind_sockets
sock.bind(sockaddr)
OSError: [Errno 99] Cannot assign requested address
The default value for --ip
(which is localhost
) seems not to be enough in a docker container environment. --ip=0.0.0.0
works fine.
Source: https://github.com/ipython/ipython/issues/6193#issuecomment-350613300
Thank you @NIPE-SYSTEMS. I merged this PR, but I also made a small update to keep it using the /host folder (rather than /root) for consistency between the two ways of running Jupyter.
Thanks for merging and the great container in general! /host
makes indeed more sense. :+1:
This improves the README/documentation of the docker container. It gives a one-liner on how to spin up a notebook without needing to interact with the container command line.