Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

DEV: Use exec for IPython commands. #37

Closed
wants to merge 1 commit into from

Conversation

ssanderson
Copy link

This makes the SIGTERM sent by docker stop hit the correct process.

This makes the SIGTERM sent by `docker stop` hit the correct process.
@ssanderson
Copy link
Author

Looks like this doesn't actually work: it makes docker stop work correctly, but ipython notebook can't spawn kernels if it's been exec'ed. I'm seeing that behavior outside of docker as well, so I'm guessing there's a bug in the interaction between IPython and exec

@rgbkrk
Copy link
Member

rgbkrk commented Apr 30, 2015

😒

@ssanderson
Copy link
Author

@rgbkrk FYI, the note here regarding seeing weirdness with exec outside of docker turned out not to be true.

I'm working around this right now using more or less the solution described as Option 3 in https://github.com/ipython/docker-notebook/issues/38.

# Forward SIGINT AND SIGTERM
_forward_sigint(){
    echo "forwarding int"
    kill -SIGINT $NOTEBOOK_PID
}
_forward_sigterm(){
    echo "forwarding term"
    kill -SIGTERM $NOTEBOOK_PID
}
trap _forward_sigterm SIGTERM
trap _forward_sigint SIGINT

# Run notebook in the background so we can get its pid.
ipython notebook --no-browser --port 8888&

NOTEBOOK_PID=$!
wait $NOTEBOOK_PID

@Carreau
Copy link
Member

Carreau commented Sep 11, 2015

Should we close this one?

@rgbkrk
Copy link
Member

rgbkrk commented Sep 12, 2015

I'll leave that up to @ssanderson.

@parente has been using supervisord inside docker-stacks.

@parente
Copy link
Member

parente commented Sep 12, 2015

@krallin recommended tini as a replacement for supervisord (jupyter/docker-stacks#24 (comment)) I plan to look into it soon for the docker-stacks.

@rgbkrk
Copy link
Member

rgbkrk commented Sep 16, 2015

Closing since this has been in a WIP state for a while, re-open if we continue on with it.

@rgbkrk rgbkrk closed this Sep 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants