美文网首页
远程服务器上开启jupyter notebook

远程服务器上开启jupyter notebook

作者: ldh123 | 来源:发表于2018-01-11 14:35 被阅读0次

    笔记本的性能有限,而且在不同地方用也不方便,想做数据分析怎么办。解决方案就是在服务器上开一个jupyter notebook的服务,然后可以从各个地方用浏览器连上去。

    1. 申请阿里云主机

    2. ssh上去以后安装anaconda,推荐用xshell连接

    3. 配置jupyter notebook

    生成配置文件

    jupyter notebook --generate-config
    

    这样就会在用户目录下生成配置文件,之后

        from notebook.auth import passwd
        passwd()
        Enter password: 
        Verify password: 
        'sha1:1295456bce22:835c2e84331d99621def6ab0857f0e8bc34692d4'
    

    记录最后的密码

    vi ~/.jupyter/jupyter_notebook_config.py
    

    把下面的内容放到配置文件里

    c.NotebookApp.ip='*'
    c.NotebookApp.password = u'上面的密码'
    c.NotebookApp.open_browser = False
    c.NotebookApp.port =8888
    

    用screen启动jupyter notebook

    这样就可以一直在后台开着了

    4. 修改阿里云安全组策略 把入方向的端口8888开放

    5. 愉快的登陆吧

    相关文章

      网友评论

          本文标题:远程服务器上开启jupyter notebook

          本文链接:https://www.haomeiwen.com/subject/iqoznxtx.html