-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad ergonomics with CLI URL output #709
Comments
Thanks for the report. This issue is a duplicate of #642 which includes a discussion about the upstream change in jupyter/notebook (jupyter/notebook#3605), documentation that was updated here to account for this change, and the behavior of containers. Reusing @minrk' summary: In general, the URL has never been valid because the container doesn't know the external port or ip. It happened to be right if you did the following:
Unfortunately, it's impossible for the container to know if either of these is the case, so the only reliable information that should be copied is the ?token=... part of the URL when the notebook is run in a container. If you have a suggestion for how to improve this part of the UX, please do open a PR against jupyter/notebook. Quite a few people have raised this concern, but no one has a great answer to displaying a URL that works in all environments where the notebook runs. |
Ok, I see. One option could be to specify the URL with an environmental variable or a flag. The advantage of an envvar is that you can specify it once in docker-compose or elsewhere and benefit from a nice URL output each time you run the container. |
If you set |
@minrk where do I set this? |
CLI as
or for docker-machine in general:
Supporting setting this via env in the docker-stacks would be sensible, and potentially slightly more convenient in certain circumstances. |
Is there any way to set this parameter via {
"NotebookApp": {
"custom_display_url": "http://localhost:8888"
}
} But it did not work. |
You can set it in a config file, just not that particular one, which is for configuring notebook javascript application. That exact JSON in |
Thank you @minrk, it worked! |
This seems to be addressed by jupyter/notebook#4103. |
I agree this looks fixed in jupyter/notebook#4103 , change which is unreleased as-of today. Not sure what the close-policy here, but this could be closed pending upstream-release and uptake here. |
Thanks for triaging. I agree we can close as the fix is upstream and workarounds are documented here in the meantime. |
On
jupyter/tensorflow-notebook
, when launching it, the terminal is supposed to output the URL to which I should navigate to access the notebook. Currently, it outputs:http://(f844870a601a or 127.0.0.1):8888/?token=9ef73cf92a2b71ea5656ba2090e7301550c502ee99dcc5bf
Previously, it output:
http://127.0.0.1:8888/?token=9ef73cf92a2b71ea5656ba2090e7301550c502ee99dcc5bf
With the previous output, I could CMD+Click on the URL from iTerm2 to open the browser fast. With the new output, I can't do so, since the output does not present a valid URL. Copy-pasting takes more time and reduces ergonomics.
The text was updated successfully, but these errors were encountered: