服务器使用
本地使用远程服务器 jupyter notebook
服务器端
安装notebook
如果我们想把自己创建的虚拟环境(如torch11 )写入jupter中,可以这样操作:
conda install nb_conda # 为Jupyter Notebook配置虚拟环境
conda install ipykernel # 为Jupyter Notebook配置虚拟环境
python -m ipykernel install --user --name torch11
启动 jupyter notebook
注:复制倒数第二行的 token,这个 token 就是远程访问的密码,同时记下端口号8888。
本地PC端
在 PC 端做一个端口映射,即通过 ssh 隧道来将服务器端的8888端口号映射到本地(PC端)的某个端口(如1234):
直接访问http://localhost:1234