I am new to docker. My host OS is W10 Enterprise 64bit, I installed docker v18.06.
I was following the guide here to install docker and run the image. I think the guide for windows is a little out of date, but nevertheless, I thought it should be ok.
I sucessfully installed docker in that I could pull and run hello world. I could pull the image I was interested in (miykael/nipype_tutorial), but on trying to run the image, the URL I am given does not work in my browser (firefox). I have tried replaing the front of the URL with localhost, host machine i/p and the DockerNAT i/p (I thought this would be the right one), but with no luck. Any ideas what is going wrong here?
See my powershell command and o/p:
PS C:\Users\MCLEAJO685> docker run -it --rm -p 8888:8888 miykael/nipype_tutorial jupyter notebook
[I 09:50:53.936 NotebookApp] [nb_conda_kernels] enabled, 2 kernels found
[I 09:50:53.956 NotebookApp] Writing notebook server cookie secret to /home/neuro/.local/share/jupyter/runtime/notebook_cookie_secret
[I 09:50:54.166 NotebookApp] [jupyter_nbextensions_configurator] enabled 0.4.0
[I 09:50:54.198 NotebookApp] JupyterLab extension loaded from /opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/jupyterlab
[I 09:50:54.198 NotebookApp] JupyterLab application directory is /opt/miniconda-latest/envs/neuro/share/jupyter/lab
[I 09:50:54.348 NotebookApp] [nb_conda] enabled
[I 09:50:54.349 NotebookApp] Serving notebooks from local directory: /home/neuro/nipype_tutorial
[I 09:50:54.350 NotebookApp] The Jupyter Notebook is running at:
[I 09:50:54.351 NotebookApp] http://(815a6c95e372 or 127.0.0.1):8888/?token=e013619cdebfe111d69c1952ede336dd7a688813cd05d3c0
[I 09:50:54.351 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 09:50:54.354 NotebookApp] No web browser found: could not locate runnable browser.
[C 09:50:54.354 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://(815a6c95e372 or 127.0.0.1):8888/?token=e013619cdebfe111d69c1952ede336dd7a688813cd05d3c0
I was digging around on various forums looking into the new error i was receiving. I saw one post suggesting ‘experimental features’ from Docker settings > Daemon, should be turned off. In hope rather than expectation, I turned experimental features ‘on’, as my setting was already off. Miraculously, this allows me to run the image and jupyter notebook. No idea why.
The url i had to copy onto my browser went as follows:
http://(572887568e37 or 127.0.0.1):8888/?token=a069361e348d97b30b42db38dcaa725b0ff1ff3cf9b21a68
where I edited it in the browser and selected the 127.0.0.1 i/p
Webbrowser is part of the python standard library, you don’t have to install a separate package to use it because it comes bundled with your python installation. If you want to get recognized browsers on your system:
import webbrowser
print webbrowser._browsers
If you directly use webbrowser.open() - it will always open the link in the default browser. What you can do is to register the any other browser and then launch a new tab. Something like this:
Once a python browser type is registered, the get() function can return a controller for that browser type. You can run open, open_new and open_new_tab on the controller object. This will ensure the commands are executed on the same browser instance you opened.