tlkh/ai-lab

Jupyter token not displayed / password needed

tinkerbeast opened this issue · 1 comments

Describe the bug
The Jupyter cli output doesn't show a token. So I can't login to jupyter notebook (it asks for a password).

To Reproduce

docker run \
	--rm \
	-p 8888:8888 \
	-v `pwd`/$aiws:/home/jovyan/workspace \
	--gpus all \
	nvaitc/ai-lab:19.11-tf2-vnc

Expected behavior
The cli should be showing a token like http://127.0.0.1:8888/?token=d82884987e890f3d4698ab5565b802adbb35c8b8d0287d6a. The screenshots at https://github.com/NVAITC/ai-lab/blob/master/INSTRUCTIONS.md also show tokens.

Screenshots

Container must be run with group "root" to update passwd file
Executing the command: jupyter notebook
[I 07:34:57.049 NotebookApp] Writing notebook server cookie secret to /home/jovyan/.local/share/jupyter/runtime/notebook_cookie_secret
[I 07:34:57.688 NotebookApp] [jupyter_nbextensions_configurator] enabled 0.4.1
[I 07:34:58.905 NotebookApp] JupyterLab extension loaded from /opt/conda/lib/python3.6/site-packages/jupyterlab
[I 07:34:58.905 NotebookApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
[I 07:34:59.837 NotebookApp] Serving notebooks from local directory: /home/jovyan
[I 07:34:59.837 NotebookApp] The Jupyter Notebook is running at:
[I 07:34:59.838 NotebookApp] http://(99b044404c91 or 127.0.0.1):8888/
[I 07:34:59.838 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 07:36:04.970 NotebookApp] 302 GET / (172.17.0.1) 0.93ms
[I 07:36:04.980 NotebookApp] 302 GET /tree? (172.17.0.1) 0.93ms
[W 07:36:51.404 NotebookApp] 401 POST /login?next=%2Flab (172.17.0.1) 1.83ms referer=http://localhost:8888/login?next=%2Flab

Client (please complete the following information):

  • Linux xyz 5.0.0-36-generic #39~18.04.1-Ubuntu SMP Tue Nov 12 11:09:50 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  • Firefox

Container Version
nvaitc/ai-lab:19.11-tf2-vnc

Additional context
None

tlkh commented

Hi, sorry about that.

I've recently added in a mechanism that I forgot to document. You pass in an env variable called NB_PASSWD to the container to set the password, otherwise the password will be blank (just click login). This is better than having no password (previous default behavior).

Example for setting a password:

docker run ... -e NB_PASSWD='asdf1234' ...