zoukankan      html  css  js  c++  java
  • jupyter notebook as a server

    Prerequisite: A notebook configuration file

    Check to see if you have a notebook configuration file, jupyter_notebook_config.py. the default location for this file is your Jupyter folder in your home directory, ~/.jupyter.

    If you don't already have one, create a config file for the notebook using the following command:

    $ jupyter notebook --generate-config

    You can setup a password for your notebook server with a single command. it store at you jupyter_notebook_config.json file.

    $ jupyter notebook password
    Enter password: ***
    Verify password: ***

    also you can encrypt your password, in python environment:

    from notebook.auth import passwd
    passwd()
    
    Enter password:
    Verify password:
    
     'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'

    if you want to openssl function:

    $ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout mykey.key -out mycert.pem

    config your jupter_notebook_config.py file. I didn't use = u'xxx' options

    # Set options for certfile, ip, password, and toggle off
    # browser auto-opening
    c.NotebookApp.certfile = u'/absolute/path/to/your/certificate/mycert.pem'
    c.NotebookApp.keyfile = u'/absolute/path/to/your/certificate/mykey.key'
    # Set ip to '*' to bind on all interfaces (ips) for the public server
    c.NotebookApp.ip = '*'
    c.NotebookApp.password = u'sha1:bcd259ccf...<your hashed password here>'
    c.NotebookApp.open_browser = False
    
    # It is a good idea to set a known, fixed port for server access
    c.NotebookApp.port = 9999

    run jupyter notebook command.

    All of config from http://jupyter-notebook.readthedocs.io/en/stable/public_server.html

  • 相关阅读:
    财务系统重复付款case分析及解决方案
    MySQL体系结构
    安装篇九:安装wordpress(5.4版本)
    安装篇八:配置 Nginx 使其支持 MySQL 应用
    安装篇七:配置 Nginx 使其支持 PHP 应用
    安装篇六:安装PHP(7.2.29版本)
    安装篇五:安装MySQL(5.6.38版本)
    安装篇四:安装NGINX(1.4.0版本)
    安装篇三:系统初始化设置
    安装篇二:CentOS 6.9系统安装
  • 原文地址:https://www.cnblogs.com/ecwork/p/7855860.html
Copyright © 2011-2022 走看看