Linux上配置Jupyter Notebook远程访问
现在运行深度学习的程序基本需要比较高配置的GPU服务器,所以一般会通过自己的电脑远程访问服务器。但是服务器上没有浏览器,我想在服务器上运行Jupyter Notebook该怎么访问呢?
安装ipython, jupyter
1 | pip install ipython |
如果是在Anaconda虚拟环境中运行Jupyter的话还需要安装conda install notebook ipykernel(Python3适用)
生成配置文件
1 | jupyter notebook --generate-config |
生成密码
1 | hailin@601GPU /]$ ipython |
修改默认配置文件
1 | vi /home/hailin/.jupyter/jupyter_notebook_config.py |
启动jupyter notebook
1 | jupyter notebook |
本地浏览器访问远程

JupyterHub
Anaconda install for all users:
1、install it to a global location, like /opt/anaconda;
2、Add the anaconda PATH to /etc/profile:
1 | # for anaconda 2 : |
3、Install JupyterHub:
1 | conda install -c conda-forge jupyterhub # installs jupyterhub and proxy |
https://jupyterhub.readthedocs.io/en/stable/quickstart.html
4、Start the Hub server
To start the Hub server, run the command:
jupyterhub
Visit http://localhost:8000 in your browser, and sign in with your unix credentials.
500 : Internal Server Error jupyterhub
When lunach a notebook, maybe you meet that problem, how to fix:
1 |
|
JupyterHub的nbextensions插件使用(自动补全代码等):https://zhuanlan.zhihu.com/p/150509456