Skip to content
Advertisement

Failed to use screen or nohup to keep Jupyter Notebook running in the background

I am doing machine learning on the company’s server

I usually start the Jupyter notebook on my laptop, using the command jupyter-notebook --ip=192.168.1.200 --no-browser --port=999 in Xshell command line. Then copy the URL link to a browser.

This time the ML is going to take up a lot of time, so I wish to run the training over the weekend.

How can I achieve it as I turned off my laptop and take it home and reopen the same Jupyter page on Monday?

I have tried

  1. nohup

nohup jupyter-notebook --ip=192.168.1.200 --no-browser --port=999 -> jupyter.out &

and nohup jupyter-notebook --ip=192.168.1.200 --no-browser --port=999 > jupyter.out 2>&1

But this popped me nohup: ignoring input and redirecting stderr to stdout

  1. Screen

I also tried as screen as mentioned in this question

By typing screen to enter a screen and start the Jupyter Notebook there using the URL provided (localhost:999 in the browser does not work for me).

While I started the training and closed the browser then reopen the Jupyter Notebook in the browser, the training stopped once I turned off the browser. The epoch stopped at 9.

By the way, it is a Linux server built using Centos.

Thanks

Advertisement

Answer

Well.. I can be done by typing screen in the server command line and run jupyter notebook in the screen.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement