How do I run a docker pulled machine learning image (smizy/scikit-learn) running jupyter notebook

Steps followed:

  1. Create a Docker linode

  2. SSH into it: ssh root@<ip_address>

  3. Pull the image from docker hub: docker pull smizy/scikit-learn

  4. Run the container: docker run -it --rm smizy/scikit-learn

  5. 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
    or http://127.0.0.1:8888/?token=967d7d9cd650fb78819922c966a4b0ad72573b398cd2a852

  6. 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.

  1. ssh -L 8000:localhost:8889 root@<ip_address>
  2. run container
  3. type localhost:8000 into any browser
  4. "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.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct