远程连接GPU服务器上的jupyter notebook韩国gpu服务器使用教程
远程连接GPU服务器上的jupyternotebook?
涉及到需要在自己的笔记本上远程连接服务器上的jupyternotebook来使用GPU服务器上的算力。以下分为单用户和多用户的解决方案。
单用户就是1个账号上运行1个jupyternotebook服务,只需要分配一个端口;多用户就是你一个账号要开n个jupyternotebook服务,需要分配多个端口。
单用户连接jupyternotebook解决方案
以下操作均在GPU服务器上进行。
安装jupyternotebook
安装Anaconda3
bashAnaconda3-2019.10-Linux-x86_64.sh(需要去官网下载)
创建虚拟环境
condacreate-nxxxpython=3.7
激活虚拟环境
condaactiavtexxx
安装jupyternotebook
配置jupyternotebook远程
生成配置文件
jupyternotebook--generate-config(在虚拟环境里运行)
上述代码会在~/.jupyter下生成一个jupyter_notebook_config.py文件。
修改配置文件
vi~/.jupyter/jupyter_notebook_config.py
修改内容:(记得去掉每行前面的’#’)
c.NotebookApp.ip='*'#表示同一网络的主机都可访问
c.NotebookApp.password=u'sha密文'
c.NotebookApp.open_browser=False
c.NotebookApp.port=8888#随便指定一个端口(这个需要看是不是冲突)
sha密文生成方式。
In[1]:fromnotebook.authimportpasswd
In[2]:passwd()
Enterpassword:
Verifypassword:
Out[2]:'sha1:xxxxxxxxx:xxxxxxxxxxxxxxxxxxxxx'
运行jupyternotebook
jupyternotebook(在虚拟环境内输入)
运行效果如下:
可见图中jupyternotebook是GPU服务器IP:8800
在浏览器输入GPU服务器IP:8800
多用户连接jupyternotebook解决方案
问题
多用户是在配置好上述单用户的情况下,比如我们还有另一个虚拟环境xxx2,这个环境我们也需要使用jupyternotebook,而且在很多情况下我们需要同时使用,因为有些代码是需要跑很长时间的。多个jupyternotebook意味着需要多个端口,也同时意味着需要多个配置文件。但是,我们上面只生成了一个配置文件,这该怎么办?
解决方案
复制单用户时的jupyter_notebook_config.py文件,并且命名为jpconfig.py,同时修改端口号,保证不冲突。
cp~/.jupyter/jupyter_notebook_config.py~/.jupyter/jpconfig.py
在另一个虚拟环境内启动jupyternotebook时手动指定配置文件,否则会默认使用~/.jupyter/jupyter_notebook_config.py作为配置文件
jupyternotebook--config~/.jupyter/jpconfig.py
在浏览器同时访问GPU服务器上的多个虚拟环境下的jupyternotebook.
GPU服务器IP:8800
GPU服务器IP:8900
韩国gpu服务器使用教程?
韩国GPU服务器Ⅰ型
CPUE5-2450L*2
内存32GB
硬盘250G固态硬盘
显卡GT7102G显存
IP独立IP
带宽10M
机房韩国机房
韩国GPU服务器Ⅱ型
CPUE5-2630V3*2
内存32GB
硬盘250G固态硬盘
显卡GT10302G显存
IP独立IP
带宽10M
机房韩国机房
韩国GPU服务器Ⅲ型
CPUE5-2660V3*2
内存32GB
硬盘250G固态硬盘
显卡GT10302G显存
IP独立IP
带宽10M
机房韩国机房
专业提供GPU服务器租用,美国GPU服务器租用、泉州GPU服务器租用、成都GPU服务器租用、江西GPU服务器租用、香港GPU服务器租用、美国GPU服务器租用、韩国GPU服务器租用、新加坡GPU服务器租用等,有需要的朋友可以咨询我们,QQ:251442993,微信:liutongbao131420。