远程访问服务器上的jupyter和tensorboard

刘建中
2023-12-01

一、基本方法

这里主要是通过ssh端口转发的方式实现。

二、服务器端启动服务

nohup jupyter-notebook --notebook-dir <notebook data dir> --no-browser --port <jupyter port> --ip <server ip> > jupyter.log 2>&1 &

三、建立ssh隧道

nohup ssh -i <private key> -N -f -L localhost:8888:<server ip>:<port> [username]@[ip address] >/dev/null 2>&1 &

四、本地访问tensorboard和jupyter服务

在本地就可以通过http://localhost:port方式访问对应jupyter和tensorboard的服务,jupyter启动时所需要的token从日志文件里可以查找到。

 类似资料: