Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restart Jupyter Lab server running in the background

I'm trying to restart a Jupyter Lab server (not just the kernels) running in the background of an AWS SageMaker notebook instance. I have already tried the following:

  • Killing the server by it's process ID
    • pgrep doesn't show me the process
    • pkill can't find the process
    • ps aux shows the process ID as constantly changing
  • Stopping the server through jupyter notebook stop
    • I get an SSL error and nothing happens

The only thing I've been able to do is reboot the entire instance, which isn't a great option as it can take awhile to become available again.

Edit 1:

The main reason I am trying to do this is that after installing the tqdm package and trying to use tqdm.notebook in Jupyter Lab, in order for it to display correctly I need to enable/install notebook and lab extensions. In order for these to take effect the server then needs to be restarted.

like image 232
Ian Avatar asked Mar 04 '20 21:03

Ian


Video Answer


2 Answers

Try this:

  1. Left hand navbar, Commands
  2. Navigate to the Help section on the popout menu
  3. Reset Application State
like image 72
Nick Walsh Avatar answered Oct 22 '22 10:10

Nick Walsh


Both classic Jupyter and Jupyter lab live within the same process.

sudo initctl restart jupyter-server --no-wait is what AWS suggest in https://forums.aws.amazon.com/thread.jspa?messageID=917594&#917594

like image 43
mkostelac Avatar answered Oct 22 '22 10:10

mkostelac