在jupyter配置目录新建custom.js文件
~/.jupyter/custom/custom.js
custom.js
define(['base/js/namespace'], function(Jupyter){
Jupyter._target = '_self';
const quitWrap = document.querySelector("#shutdown_widget");
const loginOutWrap = document.querySelector("#login_widget");
const logoWrap = document.querySelector("#ipython_notebook");
if (quitWrap) quitWrap.innerHTML = "";
if (loginOutWrap) loginOutWrap.innerHTML = "";
if (logoWrap) logoWrap.innerHTML = "";
});
在jupyter配置目录新建jupyter_config.py文件
~/.jupyter/jupyter_config.py
c.NotebookApp.allow_origin = '*'
c.NotebookApp.disable_check_xsrf = True
c.NotebookApp.token = ''
c.NotebookApp.tornado_settings = { 'headers': { 'Content-Security-Policy': "frame-ancestors self *" } }
c.NotebookApp.allow_root = True
c.NotebookApp.ip='*'
c.NotebookApp.allow_remote_access = True
c.NotebookApp.port = 8888
启动
jupyter notebook