0

I've searched for a number of hours to find the answer to this because I want to respect the idea of non-redundant posts. I'm sure the fact that I'm relatively new to programming doesn't help but here's my issue (hopefully I present it in the correct way):

I am taking a Computational Finance class that requires the package 'qstk'. There is a docker image setup with everything needed for the course, under the docker file 'ruippeixotog/qstk'. I followed the following instructions to access this docker file via the Jupiter notebook and was successful but ever since that first use of the file, I can no longer access the notebook.

I have the current version of Docker downloaded and follow the same instructions to access the notebook via a web browser (I've tried Safari, Chrome, and Firefox) but always get the error code "

  • install docker whatever OS you have (it officially supports Windows, Mac, Linux) by following the instructions on the Docker website start it, still following the instructions on the website
  • List item
  • execute on command line: docker run -dt -p 8888:8888 --name qstk
    ruippeixotog/qstk
  • open your browser at http://localhost:8888 and you have a python interpreter with QSTK fully configured

The source repository is at: https://github.com/ruippeixotog/docker-qstk

My process:

  1. I run docker with: docker run -dt -p 8888:8888 --name qstk ruippeixotog/qstk
  2. I go to http://localhost:8888

And I get the response from the browser: "Failed to open page...server unexpectedly dropped the connection"

If I run:

  1. I run docker with: docker run -dt -p 8888:8888 --name qstk ruippeixotog/qstk
  2. jupyter notebook

It brings me to my tree of file folders (localhost:8888/tree), where the two files "QSTK-0.2.5.tar.gz" and "QSTK-0.2.5.tar.gz.cpgz" Are located, along with a bunch of my other folders. When I try to edit the first of those two files, it opens a new tab and tells me "SSL is required." within the jupyter editor page for that file, showing nothing else

When I try to edit the second, it shows only "Error! /Users/.../QSTK-0.2.8

Can anyone help with this?

  • After running the `docker run` command, can you try the following and see what it returns? `docker logs $(docker ps -f name=qstk -q)` – Jay Lim Mar 11 '18 at 18:26
  • It returns:Jonathans-MBP-2:~ jonathanolson$ docker logs $(docker ps -f name=qstk -q) "docker logs" requires exactly 1 argument. See 'docker logs --help'. Usage: docker logs [OPTIONS] CONTAINER [flags] Fetch the logs of a container –  Mar 11 '18 at 20:23
  • Sorry, can you do `docker ps` to view your containers, grab the ID, and pass it to `docker logs [container-id]`. I'm trying to look at the logs for that container and figure out why were you getting that response from the browser. Alternatively, can you try binding it to a different host port, say `-p 9000:8888` and visit `http://localhost:9000`. This is because I tried it locally and it works for me, so the image must be good. Also, since you're using docker, you don't need `jupyter notebook` anymore. The `jupyter` instance will be hosted in the container itself. – Jay Lim Mar 11 '18 at 21:15
  • I uninstalled docker and redownloaded it again, before running the same run command. It seems like my terminal now accesses the container, but I cannot open it in my browser. The logs are as follows: –  Mar 11 '18 at 21:58
  • Jonathans-MBP-2:~ jonathanolson$ docker logs 2c5824c4786e 2018-03-11 21:53:55.450 [NotebookApp] Created profile dir: u'/root/.ipython/profile_default' 2018-03-11 21:53:55.454 [NotebookApp] Using system MathJax 2018-03-11 21:53:55.478 [NotebookApp] CRITICAL | WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended. 2018-03-11 21:53:55.478 [NotebookApp] CRITICAL | WARNING: The notebook server is listening on all IP addresses and not using authentication. This is highly insecure and not recommended. 2018-03-11 21:53:55.479 –  Mar 11 '18 at 21:58
  • [NotebookApp] Serving notebooks from local directory: /notebooks 2018-03-11 21:53:55.479 [NotebookApp] The IPython Notebook is running at: http://[all ip addresses on your system]:8888/ 2018-03-11 21:53:55.479 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 2018-03-11 21:53:55.479 [NotebookApp] WARNING | No web browser found: could not locate runnable browser. –  Mar 11 '18 at 21:59
  • Responding to it saying "The IPython Notebook is running at: http://[all ip addresses on your system]:8888/", I went to http://0.0.0.0:8888/ and it brings me to the ipython notebook but shows that it is acually empty –  Mar 11 '18 at 22:07
  • Hang on, I think it's working now. Thanks so much for your help, Jay. Do you think I should remove this post? –  Mar 11 '18 at 22:14
  • No problem! I think that's fine. It's good to leave it here, just in case if someone else encounters the same problem. :) Also, 0.0.0.0 corresponds to all IP addresses on your system, so technically http://localhost:8888 should work too. – Jay Lim Mar 11 '18 at 23:08

0 Answers0