JupyterLab 代理总结
要做什么
代理 JupyterLab,在节点上安装了 jupyterLab,现在想要在浏览器中访问 jupyterLab。需要代理静态资源
做了什么
启动了一个 proxy pod,专门做代理,此 pod 可以访问到 node 上的 jupyterLab。
配置
cat config.py
c = get_config()
c.ServerApp.allow_root=True
c.ServerApp.allow_remote_access=True
c.ServerApp.ip="0.0.0.0"
c.ServerApp.port=36936
c.ServerApp.root_dir="/shared/vnctest"
c.ServerApp.token="rp0fJ5hZIDPV"
c.ServerApp.base_url="/api/proxy/192.168.0.8/36936/"
cat test.sh
#!/bin/bash
spack compiler add "$(spack location -i llvm)"
spack load py-jupyterlab
jupyter lab --config=config.py