jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.75k stars 4.99k forks source link

Feature request: open a notebook without running kernel #3170

Open ibobak opened 6 years ago

ibobak commented 6 years ago

We are working with notebooks which use PySpark kernel. Very often we need just to look inside the notebook, but we don't need to run it. But if I click on the notebook, it starts a kernel as well, but PySpark kernel is very heavy and it consumes resources: after waiting for several minutes until the notebook starts, I am doing "shutdown kernel".

It would be very fine if there was a button in the notebook list "View without running kernel".

gppeixoto commented 5 years ago

+1 for this feature, looks like it hasn't gotten much love for almost a year. Any updates on this?

slidenerd commented 5 years ago

I triple this!

grisaitis commented 5 years ago

Use cases

UX ideas:

I'm surprised this isn't already possible. Maybe a plug-in implements it?

rocconnick commented 5 years ago

+1

Zaky7 commented 5 years ago

+1

thincal commented 5 years ago

+1, editing / viewing without a runtime just like the Google Colab.

nareshsankapelly commented 4 years ago

+1, this will be a useful feature.

amangarg96 commented 4 years ago

+1 Would help a lot, specially when using PySpark kernels as it takes some time to launch

yucai commented 4 years ago

+1, surprise it is not ready yet. Sometimes, just want to view the content.

JimHBeam commented 4 years ago

+1 would be usefull

prgx-erodri02 commented 4 years ago

Agree with @grisaitis There are so many use cases for opening a notebook without the intent to run any cell. It would be great to have an "Open with no Kernel" option in the context menu

JimHBeam commented 4 years ago

How about always open a notebook without a kernel until you try to run it, then fire up the kernel? This could be optional setting for opening behaviour, not sure how this would affect multi-kernal notebooks mentioned above, didnt know that was a thing

thavidu commented 4 years ago

+1 would love this to be a setting which we could customise the default for

ostrokach commented 4 years ago

One option for editing a notebook without starting a kernel is to use nteract. This does not fully address this issue, but may be helpful to some people.

LukaPitamic commented 4 years ago

+1

my case: workspace with 3 notebooks, where only one is really run, two others are imported in the first one as code

ibobak commented 4 years ago

image

ostrokach commented 4 years ago

Another option is nbviewer.

I have found that the easiest way to start a local server is using docker:

docker run -p 8080:8080 -v $(realpath .):/localfiles jupyter/nbviewer python -m nbviewer --port=8080 --localfiles=/localfiles

We can then navigate to http://localhost:8080/localfile and click on the name of a notebook in the current working directory to open a preview.

Zsailer commented 2 years ago

Thanks @ibobak! This is a great idea.

Today in JupyterLab and in the coming Notebook v7, there is an option to switch from a running kernel to "No Kernel"; however it does not currently allow you to open a notebook with "No Kernel" directly. We could add an option to open with "No Kernel" directly from the tree-view/file-browser.

We think we will be able to solve this issue with the Notebook v7 release, but it won't be a blocker for this release.

LukaPitamic commented 2 years ago

funally, that would be super awesome. Now loading a set workspaces with a lot of notebooks all kernels are getting initiated.

rickwierenga commented 2 years ago

Has anyone built this yet?

jtpio commented 1 year ago

This should work in the latest Notebook 7 pre-release, using the --LabServerApp.notebook_starts_kernel=False option:

  1. pip install notebook --pre
  2. jupyter notebook --LabServerApp.notebook_starts_kernel=False

https://github.com/jupyter/notebook/assets/591645/1c7ef194-62e2-4ec3-a39c-dbfd0ec3ffa7