• 配置远程jupyter server


    Configure the Jupyter server

    1. Create an SSL certificate.

    $ cd

    $ mkdir ssl

    $ cd ssl

    $ sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout cert.key" -out "cert.pem" -batch

    2. Create a password. You use this password to log in to the Jupyter notebook server from your client so you can access notebooks on the server.

    (a) Open the iPython terminal.

    $ ipython

    At the iPython prompt, run the passwd() command to set the password.

    iPythonPrompt> from IPython.lib import passwd

    iPythonPrompt> passwd()

    You get the password hash (For example, sha1:examplefc216:3a35a98ed...)

    (b) Record the password hash.

    (c) Exit the iPython terminal.

    $ exit

    3. Create a Jupyter configuration file.

    $ jupyter notebook --generate-config

    The command creates a configuration file (jupyter_notebook_config.py) in the ~/.jupyter directory.

    4. Update the configuration file to store your password and SSL certificate information.

    (a) Open the .config file.

    vi ~/.jupyter/jupyter_notebook_config.py

    (b) Paste the following text at the end of the file. You will need to provide your password hash.

    c = get_config()  # Get the config object.
    c.NotebookApp.certfile = u'/home/ubuntu/ssl/cert.pem' # path to the certificate we generated
    c.NotebookApp.keyfile = u'/home/ubuntu/ssl/cert.key' # path to the certificate key we generated
    c.IPKernelApp.pylab = 'inline'  # in-line figure when using Matplotlib
    c.NotebookApp.ip = '*'  # Serve notebooks locally.
    c.NotebookApp.open_browser = False  # Do not open a browser window by default when using notebooks.
    c.NotebookApp.password = 'sha1:fc216:3a35a98ed980b9...
    

    This completes Jupyter server configuration.
    (c) Open your terminal,input jupyter notebook,you will get the information as follows:

    5. You need to copy your IP address above to your browser

    If you log in to the jupyter notebook server, just input the password you set above .

  • 相关阅读:
    Ionic app 通知在Moto 360 Watch上显示通知(2)
    Ionic app 通知在Moto 360 Watch上显示通知(1)
    Ionic App ActionSheet布局问题
    Ionic 图片延时加载
    Ionic app 上传图片之webApi接口
    Ionic app升级插件开发
    Ionic 添加java原生代码 报support.v4不存在问题
    Ionic 中badge的应用
    Java 期末复习提纲
    win10 + VS2015 + EF6 + MySQL
  • 原文地址:https://www.cnblogs.com/zhongzhaoxie/p/13064334.html
Copyright © 2020-2023  润新知