I'm trying to set up a docker container with a jupyter notebook installed. Everything seems to be running fine until I open an .ipynb file.
Here's the debug logs from running jupyter:
jupyter_1 | [D 16:32:58.134 NotebookApp] Native kernel (python3) available from /root/anaconda/lib/python3.6/site-packages/ipykernel/resources
jupyter_1 | [D 16:32:58.135 NotebookApp] Starting kernel: ['/root/anaconda/bin/python', '-m', 'ipykernel', '-f', '/root/.local/share/jupyter/runtime/kernel-d709c271-698e-4593-9e21-ee782bb057a1.json']
jupyter_1 | [D 16:32:58.140 NotebookApp] Connecting to: tcp://127.0.0.1:50259
jupyter_1 | [I 16:32:58.140 NotebookApp] Kernel started: d709c271-698e-4593-9e21-ee782bb057a1
jupyter_1 | [D 16:32:58.140 NotebookApp] Kernel args: {'kernel_name': 'python3', 'cwd': '/var/workspace'}
jupyter_1 | [D 16:32:58.142 NotebookApp] 201 POST /api/sessions (172.19.0.1) 12.44ms
jupyter_1 | [D 16:32:58.144 NotebookApp] 200 GET /api/contents/Untitled.ipynb/checkpoints?_=1495902777780 (172.19.0.1) 1.26ms
jupyter_1 | [D 16:32:58.214 NotebookApp] 304 GET /static/components/MathJax/extensions/Safe.js?rev=2.6.0 (172.19.0.1) 1.21ms
jupyter_1 | [D 16:32:58.297 NotebookApp] Initializing websocket connection /api/kernels/d709c271-698e-4593-9e21-ee782bb057a1/channels
jupyter_1 | [D 16:32:58.300 NotebookApp] Requesting kernel info from d709c271-698e-4593-9e21-ee782bb057a1
jupyter_1 | [D 16:32:58.300 NotebookApp] Connecting to: tcp://127.0.0.1:37738
jupyter_1 | [I 16:33:01.142 NotebookApp] KernelRestarter: restarting kernel (1/5)
jupyter_1 | [D 16:33:01.144 NotebookApp] Starting kernel: ['/root/anaconda/bin/python', '-m', 'ipykernel', '-f', '/root/.local/share/jupyter/runtime/kernel-d709c271-698e-4593-9e21-ee782bb057a1.json']
jupyter_1 | [D 16:33:01.149 NotebookApp] Connecting to: tcp://127.0.0.1:50259
jupyter_1 | [I 16:33:04.152 NotebookApp] KernelRestarter: restarting kernel (2/5)
jupyter_1 | [D 16:33:04.153 NotebookApp] Starting kernel: ['/root/anaconda/bin/python', '-m', 'ipykernel', '-f', '/root/.local/share/jupyter/runtime/kernel-d709c271-698e-4593-9e21-ee782bb057a1.json']
jupyter_1 | [D 16:33:04.159 NotebookApp] Connecting to: tcp://127.0.0.1:50259
jupyter_1 | [I 16:33:07.161 NotebookApp] KernelRestarter: restarting kernel (3/5)
jupyter_1 | [D 16:33:07.162 NotebookApp] Starting kernel: ['/root/anaconda/bin/python', '-m', 'ipykernel', '-f', '/root/.local/share/jupyter/runtime/kernel-d709c271-698e-4593-9e21-ee782bb057a1.json']
jupyter_1 | [D 16:33:07.168 NotebookApp] Connecting to: tcp://127.0.0.1:50259
jupyter_1 | [W 16:33:08.302 NotebookApp] Timeout waiting for kernel_info reply from d709c271-698e-4593-9e21-ee782bb057a1
jupyter_1 | [D 16:33:08.303 NotebookApp] Opening websocket /api/kernels/d709c271-698e-4593-9e21-ee782bb057a1/channels
jupyter_1 | [D 16:33:08.304 NotebookApp] Connecting to: tcp://127.0.0.1:37738
jupyter_1 | [D 16:33:08.305 NotebookApp] Connecting to: tcp://127.0.0.1:46487
jupyter_1 | [D 16:33:08.305 NotebookApp] Connecting to: tcp://127.0.0.1:48305
jupyter_1 | [I 16:33:10.169 NotebookApp] KernelRestarter: restarting kernel (4/5)
jupyter_1 | WARNING:root:kernel d709c271-698e-4593-9e21-ee782bb057a1 restarted
jupyter_1 | [D 16:33:10.171 NotebookApp] Starting kernel: ['/root/anaconda/bin/python', '-m', 'ipykernel', '-f', '/root/.local/share/jupyter/runtime/kernel-d709c271-698e-4593-9e21-ee782bb057a1.json']
jupyter_1 | [D 16:33:10.176 NotebookApp] Connecting to: tcp://127.0.0.1:50259
jupyter_1 | [W 16:33:13.177 NotebookApp] KernelRestarter: restart failed
jupyter_1 | [W 16:33:13.178 NotebookApp] Kernel d709c271-698e-4593-9e21-ee782bb057a1 died, removing from map.
jupyter_1 | ERROR:root:kernel d709c271-698e-4593-9e21-ee782bb057a1 restarted failed!
jupyter_1 | [D 16:33:13.185 NotebookApp] Websocket closed d709c271-698e-4593-9e21-ee782bb057a1:0580392FC0924FAA8D06C61958352847
jupyter_1 | [W 16:33:13.188 NotebookApp] Kernel deleted before session
jupyter_1 | [W 16:33:13.189 NotebookApp] 410 DELETE /api/sessions/892c369f-0dda-4d24-a084-52c7646c79e6 (172.19.0.1) 1.49ms referer=http://0.0.0.0:8888/notebooks/Untitled.ipynb
And for reference here's my Dockerfile:
FROM ubuntu:16.04
## install python
RUN apt-get update \
&& apt-get install -y apt-utils python3 python3-pip wget \
&& pip3 install --upgrade pip setuptools
## Install anaconda and do cleanup
RUN wget https://repo.continuum.io/archive/Anaconda3-4.3.1-Linux-x86_64.sh -O anaconda.sh \
&& chmod 700 anaconda.sh \
&& /bin/bash anaconda.sh -bp /root/anaconda \
&& rm -f anaconda.sh \
&& /root/anaconda/bin/conda install -y jupyter
WORKDIR /var/workspace
EXPOSE 8888
CMD ["/root/anaconda/bin/jupyter", "notebook", "--no-browser", "--ip=0.0.0.0", "--log-level=DEBUG"]
This is actually the second attempt, the first of which I have on my github account in which I tried to do this on a alpine linux install and I was having the same problem there. I switched to ubuntu just to make sure that wasn't the issue.
Ideally I'd like to get debug logs from the kernel itself, but I don't see any way to get the system to pass the debug log level onto the kernel. Perhaps I'll try hacking the site-packages files to see if I can update the system call to include the debug flags.
In the mean-time, has anyone experienced this and found a solution?
Oh.. btw. I have this installed locally and it works just fine. I could give up and just use that, but what fun would that be?