Notebook on the server runs locally

The 3090TI server uses the Ubuntu system. How to make the server resources run in the local JupyterNotebook when in use?

Table of contents

1. Designate a specific access port on the 3090TI server

2. Local port configuration

3. Local JupyterNotebook access server


1. Designate a specific access port on the 3090TI server

1. Specify a specific access port on the server.
Generally, after we configure jupyter notebook, we only need to use the command when starting it.

jupyter notebook

That's it, but now it's a special case where we need to specify a port:

jupyter notebook --no-browser --port=8889

2. Local port configuration

Use ssh to specify a port on this machine (localhost) to connect to port 8889 of the server

Press and hold windows + R, enter cmd to bring up the local terminal interface
and enter the following content

ssh -N -f -L localhost:8836:localhost:8889 [email protected]

"-N" means that ssh has no command to be executed remotely.
"-f" means that the command is executed in the background.
"-L" is for port configuration.
The remote port is 8889, and the local port is 8836. The
account number in the server is followed by
the server's ip address.

3. Local JupyterNotebook access server

The server opens a virtual environment and enters:

jupyter notebook

Enter localhost:8836 in the search page of the browser to access

  

Guess you like

Origin blog.csdn.net/weixin_43734080/article/details/131676618