I created a docker image with python libraries and Jupyter.
I start the container with the option -p 8888:8888
, to link ports between host and container.
When I launch a Jupyter kernel inside the container, it is running on localhost:8888
(and does not find a browser). I used the command jupyter notebook
But from my host, what is the IP address I have to use to work with Jupyter in host's browser ?
With the command ifconfig
, I find eth0
, docker
, wlan0
, lo
...
Thanks !
The below is how I get it running on Windows 7 with docker toolbox.
If you are using docker toolbox, open up the Docker quickstart terminal, and note the IP here:
Once you run the docker commands from the tensorflow installation website:
You will receive a message like this:
In the host, replace 127.0.0.1 with 192.168.99.100 and use the rest of that URL
The
docker run
command is mandatory to open a port for the container to allow the connection from a host browser, assigning the port to the docker container with -p, select your jupyter image from yourdocker images
.Inside the container launch the notebook assigning the port you opened:
Access the notebook through your desktops browser on http://localhost:8888 The notebook will prompt you for a token which was generated when you create the notebook.
As an alternative to building your own Docker image, you can also use the ML Workspace image. The ML Workspace is an open-source web IDE that combines Jupyter, VS Code, a Desktop GUI, and many other tools & libraries into one convenient Docker image. Deploying a single workspace instance is as simple as:
All tools are accessible from the same port and integrated into the Jupyter UI. You can find further documentation here.