1. 首先部署jupyter lab到 wsl-ubuntu中
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple jupyter
清华源PyPI 镜像使用帮助
CUDA Toolkit 12.1
2. 生成配置文件,修改信息
在wsl命令行窗口中输入
jupyter notebook --generate-config
使用如下命令获取密码
jupyter notebook password
c.NotebookApp.ip='*' #允许访问的IP地址,设置为*代表允许任何客户端访问
c.NotebookApp.password = u'argon2:$argon2id$v=19$m=10240,t=10,p=8$QcZlyMBu9icwhDDiUl+lZw$y4EP3WI4gZjc'#刚才生成密码时上面复制的密文
c.NotebookApp.open_browser = False
c.NotebookApp.port =8888 #可自行指定一个端口, 访问时使用该端口
c.NotebookApp.allow_remote_access = True
3. 参考微软官方文档,建立端口转发
结束