Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use docker image without jupyter auto starting

I'm using the Docker image jupyter/scipy-notebook (which includes lot of packages and launches and jupyter notebook with them).

Problem: When I want to use the notebook and, with the same packages, run files with the terminal., I can't, because I cant kill the notebook without killing the container.

How can I modify the image in order to delete the auto-run of the notebook?

like image 876
sebach1 Avatar asked Dec 04 '25 00:12

sebach1


1 Answers

The entrypoint and command for the image are defined here: https://github.com/jupyter/docker-stacks/blob/6c85e4b4/base-notebook/Dockerfile#L108-L109

ENTRYPOINT ["tini", "-g", "--"]
CMD ["start-notebook.sh"]

You can edit these to run the container without the notebook server. You can either define new ones in your own dockerfile, or you could overwrite them on the command line. eg:

docker run --it --rm --entrypoint=bash jupyter/scipy-notebook echo hi

echo hi is the command in this place. With this image specifically you'll need to overwrite both to prevent the notebook server from starting.

like image 55
maxm Avatar answered Dec 05 '25 13:12

maxm



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!