How do I run a docker pulled machine learning image (smizy/scikit-learn) running jupyter notebook
Steps followed:
Create a Docker linode
SSH into it:
ssh root@<ip_address>
Pull the image from docker hub:
docker pull smizy/scikit-learn
Run the container:
docker run -it --rm smizy/scikit-learn
Output shows url to paste into browser and open jupyter notebook:
To access the notebook, open this file in a browser:
file:///home/jupyter/.local/share/jupyter/runtime/nbserver-9-open.html
Or copy and paste one of these URLs:
http://ddd6edc96a7c:8888/?token=967d7d9cd650fb78819922c966a4b0ad72573b398cd2a852
orhttp://127.0.0.1:8888/?token=967d7d9cd650fb78819922c966a4b0ad72573b398cd2a852
I command/ctrl click on either of the URLS, but get a "site can't be reached error."
I also tried the following as an alternative to step 2.
ssh -L 8000:localhost:8889 root@<ip_address>
- run container
- type
localhost:8000
into any browser - "Site can't be reached error"
I notice in my terminal this:
channel 3: open failed: connect failed: Connection refused
channel 4: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
channel 4: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
1 Reply
Hi @olivero54
I found the Docker Hub page for the image your trying to run:
Reviewing the 'Usage' section from that link, it looks like your run
command may be missing some additional options in order to run the Jupyter Notebook Container. Specifically the port option -p
which specifies using port 8888
. The URL output you provided appears to access this port as the IP address in the URLs are appended with that port http://127.0.0.1:8888/
. This may be causing your problems.
With that being said, while trying to recreate this I was able to get my Jupyter Notebook up and running with the above-linked docker-hub page. The only change I made was since I am running this virtually I switched to using my Linode's IPv4 rather than localhost (http://127.0.0.1:8888
).
I hope this helps get you headed in the right direction.