Search code examples
pythonvisual-studio-codejupytervscode-devcontainer

how to keep jupyter kernel alive inside vscode remote container?


Question:

How can I disconnect, then reconnect to a vscode dev container without killing the ipynb kernel within my workspace?

Background:

I access my jupyter notebook inside a vscode dev container in order to have reproducibility of my project-specific environment. I connect to the container host machine on my laptop. Upon re-opening my vscode workspace after reconnecting to the container, my ipynb kernel is dead and all notebook computation must be repeated.


Solution

  • Try to use jupyter server instead.

    You can refer to this issue aout using the 'remote' server to control your kernel lifetime for details.