New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dead kernels in docker IPython notebook server #7062

Closed
iiSeymour opened this Issue Nov 29, 2014 · 25 comments

Comments

Projects
None yet
@iiSeymour

iiSeymour commented Nov 29, 2014

Running the notebook server inside a Docker container results in all notebooks producing the following pop ups:

Kernel Restarting

The kernel has died, and the automatic restart has failed. It is possible the kernel cannot be restarted. If you are not able to restart the kernel, you will still be able to save the notebook, but running code will no longer work until the notebook is reopened.

Followed by:

Dead Kernel

The kernel has died, and the automatic restart has failed. It is possible the kernel cannot be restarted. If you are not able to restart the kernel, you will still be able to save the notebook, but running code will no longer work until the notebook is reopened.

The host OS is Ubuntu 12.04.5 LTS and the Docker version 1.0.1. The installed (container) IPython version is 2.3.1. My Dockerfile ends with:

EXPOSE 8888
CMD ["ipython", "notebook", "--config", "/config.py"]

The only change I have made to the config file is c.NotebookApp.ip = u'*' and container is run with:

docker run -d -p 8001:8888 -v "${PWD}"/ipython_notebook_config.py:/config.py notebook

Any ideas what could be causing this or how to diagnose it?

@Carreau Carreau changed the title from Dead kernals in docker IPython notebook server to Dead kerels in docker IPython notebook server Nov 29, 2014

@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau Nov 29, 2014

Member

Could you attach to the container and see if there are some traceback output from the notebook servers ?

Member

Carreau commented Nov 29, 2014

Could you attach to the container and see if there are some traceback output from the notebook servers ?

@iiSeymour

This comment has been minimized.

Show comment
Hide comment
@iiSeymour

iiSeymour Nov 29, 2014

The except from the server log:

[NotebookApp] Creating new notebook in /notebooks/
[NotebookApp] Writing notebook-signing key to /tmp/tmpXwJ4gM/profile_default/security/notebook_secret
[NotebookApp] Kernel started: d79ff4aa-2c56-43d8-aaca-434350c6020a
[NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel d79ff4aa-2c56-43d8-aaca-434350c6020a restarted
[NotebookApp] KernelRestarter: restarting kernel (2/5)
WARNING:root:kernel d79ff4aa-2c56-43d8-aaca-434350c6020a restarted
[NotebookApp] KernelRestarter: restarting kernel (3/5)
WARNING:root:kernel d79ff4aa-2c56-43d8-aaca-434350c6020a restarted
[NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel d79ff4aa-2c56-43d8-aaca-434350c6020a restarted
[NotebookApp] WARNING | KernelRestarter: restart failed
[NotebookApp] WARNING | Kernel d79ff4aa-2c56-43d8-aaca-434350c6020a died, removing from map.
ERROR:root:kernel d79ff4aa-2c56-43d8-aaca-434350c6020a restarted failed!

iiSeymour commented Nov 29, 2014

The except from the server log:

[NotebookApp] Creating new notebook in /notebooks/
[NotebookApp] Writing notebook-signing key to /tmp/tmpXwJ4gM/profile_default/security/notebook_secret
[NotebookApp] Kernel started: d79ff4aa-2c56-43d8-aaca-434350c6020a
[NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel d79ff4aa-2c56-43d8-aaca-434350c6020a restarted
[NotebookApp] KernelRestarter: restarting kernel (2/5)
WARNING:root:kernel d79ff4aa-2c56-43d8-aaca-434350c6020a restarted
[NotebookApp] KernelRestarter: restarting kernel (3/5)
WARNING:root:kernel d79ff4aa-2c56-43d8-aaca-434350c6020a restarted
[NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel d79ff4aa-2c56-43d8-aaca-434350c6020a restarted
[NotebookApp] WARNING | KernelRestarter: restart failed
[NotebookApp] WARNING | Kernel d79ff4aa-2c56-43d8-aaca-434350c6020a died, removing from map.
ERROR:root:kernel d79ff4aa-2c56-43d8-aaca-434350c6020a restarted failed!

@iiSeymour iiSeymour changed the title from Dead kerels in docker IPython notebook server to Dead kernels in docker IPython notebook server Nov 29, 2014

@rgbkrk

This comment has been minimized.

Show comment
Hide comment
@rgbkrk

rgbkrk Nov 30, 2014

Member

This is partially documented in jupyter-attic/docker-notebook#6, basically the CMD ["command", "args"] variety of invoking a command in Docker performs a pseudo-exec to invoke. For some reason, this doesn't play well with IPython, tornado, websockets, or 0MQ. Maybe some of these in concert with each other. I haven't been able to figure this one out, so I've been either:

  • Use the "shell form", e.g. ipython notebook --ip=*
  • Create a wrapper script to invoke notebook.sh

@takluyver looked over this too, but we didn't see anything obvious

Member

rgbkrk commented Nov 30, 2014

This is partially documented in jupyter-attic/docker-notebook#6, basically the CMD ["command", "args"] variety of invoking a command in Docker performs a pseudo-exec to invoke. For some reason, this doesn't play well with IPython, tornado, websockets, or 0MQ. Maybe some of these in concert with each other. I haven't been able to figure this one out, so I've been either:

  • Use the "shell form", e.g. ipython notebook --ip=*
  • Create a wrapper script to invoke notebook.sh

@takluyver looked over this too, but we didn't see anything obvious

@soerendip

This comment has been minimized.

Show comment
Hide comment
@soerendip

soerendip Mar 18, 2015

I have the same problem using the shell form
CMD ipython notebook --ip=*

I tried using a script, problem remains.

I am using fedora.

It does not crash when starting docker with an interactive shell and start the notebook from there!

soerendip commented Mar 18, 2015

I have the same problem using the shell form
CMD ipython notebook --ip=*

I tried using a script, problem remains.

I am using fedora.

It does not crash when starting docker with an interactive shell and start the notebook from there!

@ericchiang

This comment has been minimized.

Show comment
Hide comment
@ericchiang

ericchiang Apr 22, 2015

Are there any updates on what's causing this?

I'm trying to get a Jupyter notebook working in an Ubuntu 14.04 container (host machine is also Ubuntu 14.04) and I'm getting this error every time.

Neither shell form or psuedo-exec are working for me when using the remote API. Every combination of installing/running as root/non-root it still producing the error.

EDIT: sorry, here's the command I'm running

(tried with --ip=0.0.0.0 and --ip=*)

ipython notebook --port-retries=0 --port=8888 --no-browser --ip=0.0.0.0 --NotebookApp.base_url=/me/server

ericchiang commented Apr 22, 2015

Are there any updates on what's causing this?

I'm trying to get a Jupyter notebook working in an Ubuntu 14.04 container (host machine is also Ubuntu 14.04) and I'm getting this error every time.

Neither shell form or psuedo-exec are working for me when using the remote API. Every combination of installing/running as root/non-root it still producing the error.

EDIT: sorry, here's the command I'm running

(tried with --ip=0.0.0.0 and --ip=*)

ipython notebook --port-retries=0 --port=8888 --no-browser --ip=0.0.0.0 --NotebookApp.base_url=/me/server
@sphinxligustri

This comment has been minimized.

Show comment
Hide comment
@sphinxligustri

sphinxligustri May 15, 2015

I'm running ubuntu 14.04 x64 and had a similar issue trying to run the Jupyter Notebook docker image from Docker Jumpstart by Andrew Odewahn.

Thanks to soerendip42, for pointing me in the right direction:

It does not crash when starting docker with an interactive shell and start the notebook from there!

The Docker image doesn't start the notebook correctly when I run the following command (again from Docker Jumpstart by Andrew Odewahn)

docker run -it           \
   -p 8888:8888          \
   -v $(pwd):/usr/data   \
   -w /usr/data          \
   ipython/scipystack    \
   ipython notebook --ip=0.0.0.0 --no-browser

Actiing on soerendip42's comment, I altered it slightly to specify the use of sh -c (now it works om my computer (tm)):

docker run -it           \
   -p 8888:8888          \
   -v $(pwd):/usr/data   \
   -w /usr/data          \
   ipython/scipystack    \
   sh -c "ipython notebook --ip=0.0.0.0 --no-browser"

At some time, before the rewrite, I got the following message in the browser. Unfortunately, I don't recall the specific circumstances.

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/IPython/html/base/handlers.py", line 365, in wrapper
    result = yield gen.maybe_future(method(self, *args, **kwargs))
  File "/usr/local/lib/python3.4/dist-packages/IPython/html/services/sessions/handlers.py", line 50, in post
    model = sm.get_session(path=path)
  File "/usr/local/lib/python3.4/dist-packages/IPython/html/services/sessions/sessionmanager.py", line 139, in get_session
    return self.row_to_model(row)
  File "/usr/local/lib/python3.4/dist-packages/IPython/html/services/sessions/sessionmanager.py", line 178, in row_to_model
    raise KeyError
KeyError

sphinxligustri commented May 15, 2015

I'm running ubuntu 14.04 x64 and had a similar issue trying to run the Jupyter Notebook docker image from Docker Jumpstart by Andrew Odewahn.

Thanks to soerendip42, for pointing me in the right direction:

It does not crash when starting docker with an interactive shell and start the notebook from there!

The Docker image doesn't start the notebook correctly when I run the following command (again from Docker Jumpstart by Andrew Odewahn)

docker run -it           \
   -p 8888:8888          \
   -v $(pwd):/usr/data   \
   -w /usr/data          \
   ipython/scipystack    \
   ipython notebook --ip=0.0.0.0 --no-browser

Actiing on soerendip42's comment, I altered it slightly to specify the use of sh -c (now it works om my computer (tm)):

docker run -it           \
   -p 8888:8888          \
   -v $(pwd):/usr/data   \
   -w /usr/data          \
   ipython/scipystack    \
   sh -c "ipython notebook --ip=0.0.0.0 --no-browser"

At some time, before the rewrite, I got the following message in the browser. Unfortunately, I don't recall the specific circumstances.

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/IPython/html/base/handlers.py", line 365, in wrapper
    result = yield gen.maybe_future(method(self, *args, **kwargs))
  File "/usr/local/lib/python3.4/dist-packages/IPython/html/services/sessions/handlers.py", line 50, in post
    model = sm.get_session(path=path)
  File "/usr/local/lib/python3.4/dist-packages/IPython/html/services/sessions/sessionmanager.py", line 139, in get_session
    return self.row_to_model(row)
  File "/usr/local/lib/python3.4/dist-packages/IPython/html/services/sessions/sessionmanager.py", line 178, in row_to_model
    raise KeyError
KeyError
@rsdenijs

This comment has been minimized.

Show comment
Hide comment
@rsdenijs

rsdenijs May 22, 2015

Same problem on Debian Wheezy

Solved with sphinxligustri approach

rsdenijs commented May 22, 2015

Same problem on Debian Wheezy

Solved with sphinxligustri approach

@pikeas

This comment has been minimized.

Show comment
Hide comment
@pikeas

pikeas Jun 21, 2015

Exact same problem and solution as @sphinxligustri:

docker run -p 8888:8888 --rm <ipython image> sh -c "ipython notebook --ip=*" -> no crash
docker run -p 8888:8888 --rm <ipython image> ipython notebook --ip=* -> crash

Adding --debug doesn't provide any additional insight.

This issue is tagged needs-info - what additional information can we provide to help resolve this?

pikeas commented Jun 21, 2015

Exact same problem and solution as @sphinxligustri:

docker run -p 8888:8888 --rm <ipython image> sh -c "ipython notebook --ip=*" -> no crash
docker run -p 8888:8888 --rm <ipython image> ipython notebook --ip=* -> crash

Adding --debug doesn't provide any additional insight.

This issue is tagged needs-info - what additional information can we provide to help resolve this?

@jakirkham

This comment has been minimized.

Show comment
Hide comment
@jakirkham

jakirkham Jun 22, 2015

Contributor

Same problem. Tried all the solutions here including @sphinxligustri; however, none worked except the wrapper script idea. Used a script like this:

#!/bin/bash

ipython notebook --no-browser --ip=*
Contributor

jakirkham commented Jun 22, 2015

Same problem. Tried all the solutions here including @sphinxligustri; however, none worked except the wrapper script idea. Used a script like this:

#!/bin/bash

ipython notebook --no-browser --ip=*
@davecahill

This comment has been minimized.

Show comment
Hide comment
@davecahill

davecahill Jul 29, 2015

+1 @jakirkham - your approach is the only one which worked for me.

davecahill commented Jul 29, 2015

+1 @jakirkham - your approach is the only one which worked for me.

@jcalazan

This comment has been minimized.

Show comment
Hide comment
@jcalazan

jcalazan Aug 9, 2015

+1 Running into this issue as well on Ubuntu 14.04.

Doing docker-compose run --service-ports service_name bash then running the service in the shell works fine as others have noted.

jcalazan commented Aug 9, 2015

+1 Running into this issue as well on Ubuntu 14.04.

Doing docker-compose run --service-ports service_name bash then running the service in the shell works fine as others have noted.

@logston

This comment has been minimized.

Show comment
Hide comment
@logston

logston Aug 22, 2015

+1 @pikeas

sudo docker run -d -P <image> sh -c "jupyter notebook --notebook-dir=<my notebook dir>"

worked for me

logston commented Aug 22, 2015

+1 @pikeas

sudo docker run -d -P <image> sh -c "jupyter notebook --notebook-dir=<my notebook dir>"

worked for me

@penolove

This comment has been minimized.

Show comment
Hide comment
@penolove

penolove Aug 26, 2015

+1 @jakirkham

  • your approach is the only one which worked for me,too.

penolove commented Aug 26, 2015

+1 @jakirkham

  • your approach is the only one which worked for me,too.

ermaker added a commit to ermaker/dockerfile-keras-jupyter that referenced this issue Sep 13, 2015

@mrocklin

This comment has been minimized.

Show comment
Hide comment
@mrocklin

mrocklin Sep 16, 2015

I'm getting something similar to this issue without using docker, even with using the solution provided above. I get the dialog as above, plus the following log printout.

[W 15:32:32.555 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[W 15:32:32.555 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using authentication. This is highly insecure and not recommended.
[I 15:32:32.556 NotebookApp] The port 8888 is already in use, trying another random port.
[I 15:32:32.562 NotebookApp] Serving notebooks from local directory: /home/mrocklin/workspace/dask-examples
[I 15:32:32.562 NotebookApp] 0 active kernels 
[I 15:32:32.562 NotebookApp] The IPython Notebook is running at: http://[all ip addresses on your system]:8889/
[I 15:32:32.562 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 15:32:54.601 NotebookApp] 302 GET / (127.0.0.1) 0.75ms
[I 15:32:57.759 NotebookApp] Creating new notebook in 
[I 15:32:58.822 NotebookApp] Kernel started: 7cba51a1-0e41-47d7-b6a0-9568ef3a9da4
[I 15:33:01.818 NotebookApp] KernelRestarter: restarting kernel (1/5)
[W 15:33:08.867 NotebookApp] Timeout waiting for kernel_info reply from 7cba51a1-0e41-47d7-b6a0-9568ef3a9da4
[I 15:33:10.826 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 7cba51a1-0e41-47d7-b6a0-9568ef3a9da4 restarted
[I 15:33:13.835 NotebookApp] KernelRestarter: restarting kernel (2/5)

mrocklin commented Sep 16, 2015

I'm getting something similar to this issue without using docker, even with using the solution provided above. I get the dialog as above, plus the following log printout.

[W 15:32:32.555 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[W 15:32:32.555 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using authentication. This is highly insecure and not recommended.
[I 15:32:32.556 NotebookApp] The port 8888 is already in use, trying another random port.
[I 15:32:32.562 NotebookApp] Serving notebooks from local directory: /home/mrocklin/workspace/dask-examples
[I 15:32:32.562 NotebookApp] 0 active kernels 
[I 15:32:32.562 NotebookApp] The IPython Notebook is running at: http://[all ip addresses on your system]:8889/
[I 15:32:32.562 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 15:32:54.601 NotebookApp] 302 GET / (127.0.0.1) 0.75ms
[I 15:32:57.759 NotebookApp] Creating new notebook in 
[I 15:32:58.822 NotebookApp] Kernel started: 7cba51a1-0e41-47d7-b6a0-9568ef3a9da4
[I 15:33:01.818 NotebookApp] KernelRestarter: restarting kernel (1/5)
[W 15:33:08.867 NotebookApp] Timeout waiting for kernel_info reply from 7cba51a1-0e41-47d7-b6a0-9568ef3a9da4
[I 15:33:10.826 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 7cba51a1-0e41-47d7-b6a0-9568ef3a9da4 restarted
[I 15:33:13.835 NotebookApp] KernelRestarter: restarting kernel (2/5)
@solomatov

This comment has been minimized.

Show comment
Hide comment
@solomatov

solomatov Dec 8, 2015

I have the same problem.

solomatov commented Dec 8, 2015

I have the same problem.

@thewtex

This comment has been minimized.

Show comment
Hide comment
@thewtex

thewtex Dec 8, 2015

@mrocklin @solomatov Two notebooks will not be able to use the same port:

[I 15:32:32.556 NotebookApp] The port 8888 is already in use, trying another random port.

thewtex commented Dec 8, 2015

@mrocklin @solomatov Two notebooks will not be able to use the same port:

[I 15:32:32.556 NotebookApp] The port 8888 is already in use, trying another random port.
@mrocklin

This comment has been minimized.

Show comment
Hide comment
@mrocklin

mrocklin Dec 8, 2015

Previously I received this error after freshly booting up my system. This issue actually triggered me to completely reinstall Anaconda, which did resolve the problem.

mrocklin commented Dec 8, 2015

Previously I received this error after freshly booting up my system. This issue actually triggered me to completely reinstall Anaconda, which did resolve the problem.

@takluyver takluyver modified the milestones: note, not ipython Jan 26, 2016

@takluyver takluyver added the notebook label Jan 26, 2016

oubiwann added a commit to USGS-EROS/lcmap-dockerfiles that referenced this issue Feb 24, 2016

ENTRYPOINT doesn't work for Jupyter on Docker.
Turns out this is a problem for Tornado, 0MQ, and/or other parts of the Jupyter
stack. For more details, see:
 * ipython/ipython#7062
@hupili

This comment has been minimized.

Show comment
Hide comment
@hupili

hupili Jun 5, 2016

Same here starting iPython notebook via docker-compose. Solved by this comment: #7062 (comment)

In short, in my docker-compose.yml, I changed from command: ipython notebook --ip 0.0.0.0 to command: sh -c 'ipython notebook --ip 0.0.0.0'

hupili commented Jun 5, 2016

Same here starting iPython notebook via docker-compose. Solved by this comment: #7062 (comment)

In short, in my docker-compose.yml, I changed from command: ipython notebook --ip 0.0.0.0 to command: sh -c 'ipython notebook --ip 0.0.0.0'

@ezeakeal-ps

This comment has been minimized.

Show comment
Hide comment
@ezeakeal-ps

ezeakeal-ps Jul 28, 2016

Hi all, I hope this is useful to someone

I had a similar issue with Jupyter not connecting to the kernel.
Running via Django extensions: /python manage.py shell_plus --notebook
I saw "python kernels fail to start" and I tried almost everything listed.
We are running the notebook inside of Docker

In the end, I ran the same command via supervisord, and for some reason it worked.

command=/opt/conda/bin/python manage.py shell_plus --notebook --settings=settings.jupyter
directory=/opt/jupyter
stopasgroup=true
autostart=true
startsecs=1
startretries=1
logfile_backups=0
stdout_logfile=/data/logs/jupyter.out
stderr_logfile=/data/logs/jupyter.err

The settings file had no bearing on the output here..

ezeakeal-ps commented Jul 28, 2016

Hi all, I hope this is useful to someone

I had a similar issue with Jupyter not connecting to the kernel.
Running via Django extensions: /python manage.py shell_plus --notebook
I saw "python kernels fail to start" and I tried almost everything listed.
We are running the notebook inside of Docker

In the end, I ran the same command via supervisord, and for some reason it worked.

command=/opt/conda/bin/python manage.py shell_plus --notebook --settings=settings.jupyter
directory=/opt/jupyter
stopasgroup=true
autostart=true
startsecs=1
startretries=1
logfile_backups=0
stdout_logfile=/data/logs/jupyter.out
stderr_logfile=/data/logs/jupyter.err

The settings file had no bearing on the output here..

ahxxm added a commit to ahxxm/base that referenced this issue Aug 10, 2016

@ahxxm

This comment has been minimized.

Show comment
Hide comment
@ahxxm

ahxxm Aug 10, 2016

a wrapper works for me.. no idea about rationale though

ahxxm commented Aug 10, 2016

a wrapper works for me.. no idea about rationale though

@jakirkham

This comment has been minimized.

Show comment
Hide comment
@jakirkham

jakirkham Aug 10, 2016

Contributor

This is probably some child reaping issue. While using bash or supervisord kind of work, neither are intended for this use case. The best thing I have seen thus far is tini, which just works nicely at solving this problem.

Contributor

jakirkham commented Aug 10, 2016

This is probably some child reaping issue. While using bash or supervisord kind of work, neither are intended for this use case. The best thing I have seen thus far is tini, which just works nicely at solving this problem.

@ahxxm

This comment has been minimized.

Show comment
Hide comment
@ahxxm

ahxxm Aug 10, 2016

tini seems to be used by official ipython notebook images, but those Dockerfile result in huge images with more than 20 layers...

ahxxm commented Aug 10, 2016

tini seems to be used by official ipython notebook images, but those Dockerfile result in huge images with more than 20 layers...

ahxxm added a commit to ahxxm/base that referenced this issue Aug 10, 2016

Ipython image (#11)
* initial minimal notebook build

* add build.sh, disable pip cache

* add circle build for ipython

* run build.sh from relative path

* always https and use password

default password: L1b&MQ

* fix root path

* add pandas and matplotlib

* try register ipython3 kernel

* remove python2

* add freetype and libpng as matplotlib dep

* del build-base only

* try add a wrapper for died kernel

Issue: ipython/ipython#7062

* add readme for ipython, fix cmd path
@cavaunpeu

This comment has been minimized.

Show comment
Hide comment
@cavaunpeu

cavaunpeu Nov 6, 2016

Simply add sh -c in front of my Jupyter notebook launch command worked for me. E.g.

docker run -w /tmp/notebooks -v $(pwd)/notebooks:/tmp/notebooks --rm -p 127.0.0.1:8888:8888 $DOCKER_IMAGE sh -c 'jupyter notebook --ip=0.0.0.0 --no-browser --notebook-dir=/tmp/notebooks'

cavaunpeu commented Nov 6, 2016

Simply add sh -c in front of my Jupyter notebook launch command worked for me. E.g.

docker run -w /tmp/notebooks -v $(pwd)/notebooks:/tmp/notebooks --rm -p 127.0.0.1:8888:8888 $DOCKER_IMAGE sh -c 'jupyter notebook --ip=0.0.0.0 --no-browser --notebook-dir=/tmp/notebooks'

@norela

This comment has been minimized.

Show comment
Hide comment
@norela

norela Jan 20, 2017

Same problem here. However, working with sh -c didn't work for me.
docker run --rm -ti -v ~/Dockervolume:/hostdir container sh -c 'jupyter notebook --config=/tmp/config.py'
Still results in kernels not starting. Though they are when starting jupyter notebook with the same parameters interactively.
Using a script as jakirkham suggested works.

norela commented Jan 20, 2017

Same problem here. However, working with sh -c didn't work for me.
docker run --rm -ti -v ~/Dockervolume:/hostdir container sh -c 'jupyter notebook --config=/tmp/config.py'
Still results in kernels not starting. Though they are when starting jupyter notebook with the same parameters interactively.
Using a script as jakirkham suggested works.

shivam-kotwalia added a commit to shivam-kotwalia/Docker that referenced this issue Jun 23, 2017

Start Jupyter
Run jupyter on docker startup, as you can't run Jupyter through RUN of Docker. (Issue: ipython/ipython#7062)
@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau Jul 20, 2017

Member

Closing as this issue is not in IPython itself and if still problematic and relevant should be opened on the right repository. This will allow to keep the number of opened issue on the IPython repo under control.

Feel free to keep commenting or reopen if necessary.

Thanks.

Member

Carreau commented Jul 20, 2017

Closing as this issue is not in IPython itself and if still problematic and relevant should be opened on the right repository. This will allow to keep the number of opened issue on the IPython repo under control.

Feel free to keep commenting or reopen if necessary.

Thanks.

@Carreau Carreau closed this Jul 20, 2017

irfansharif added a commit to irfansharif/notebooks that referenced this issue Mar 27, 2018

Initial commit; base from continuumio/anaconda3
Jupyter has issues with being run directly:
  ipython/ipython#7062

Introduce a wrapper script to invoke it instead.

irfansharif added a commit to irfansharif/notebooks that referenced this issue Mar 28, 2018

Initial commit; base from continuumio/anaconda3
Jupyter has issues with being run directly:
  ipython/ipython#7062

Introduce a wrapper script to invoke it instead.

irfansharif added a commit to irfansharif/notebooks that referenced this issue Mar 28, 2018

Initial commit; base from continuumio/anaconda3
Jupyter has issues with being run directly:
  ipython/ipython#7062

Introduce a wrapper script to invoke it instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment