Linux上部署Jupyter notebook

devtools/2024/9/24 21:39:47/

jupyter_notebook_0">安装jupyter notebook

pip install notebook 
#或者
conda install notebook

配置

jupyter notebook --generate-config
## The IP address the notebook server will listen on.
#  Default: 'localhost'
# 设置可以访问的ip, 默认是localhost, 将其改为 '*'
c.NotebookApp.ip = '*'## The directory to use for notebooks and kernels.
#  Default: ''
# 默认打开目录
c.NotebookApp.notebook_dir = '/home/data123share66/python'## Whether to open in a browser after starting.
#                          The specific browser used is platform dependent and
#                          determined by the python standard library `webbrowser`
#                          module, unless it is overridden using the --browser
#                          (NotebookApp.browser) configuration option.
#  Default: True
# Jupyter notebook启动后是否打开浏览器, 设为 False 即可
c.NotebookApp.open_browser = False## Hashed password to use for web authentication.
#  
#                        To generate, type in a python/IPython shell:
#  
#                          from notebook.auth import passwd; passwd()
#  
#                        The string should be of the form type:salt:hashed-
#  password.
#  Default: ''
c.NotebookApp.password = 'argon2:$argon2id$v=19$m=10240,t=10,p=8$Ny6WDdoLBm88cUMyOqgNqg$s3WObP81eU51RT2j8D8DULPM1OAPOnzYfODW8olB0xw'

密码设置

1、运行python
2、命令:from notebook.auth import passwd; passwd()
3、copy 密码

扩展插件

pip install jupyter_contrib_nbextensionsjupyter-contrib-nbextension install --user

在这里插入图片描述

后台运行

1、tmux new -s jupyter2jupyter notebook --ip=0.0.0.0 --port=9999 --allow-root3、然后我们按住快捷键Ctrl+b,松开,再按一下d。我们就把这个会话放到了后台。4、返回窗口:tmux attach -t jupyter

使用

在浏览器输入服务器的IP地址:9999,小编这里是34.81.173.39:9999,访问

参考

https://blog.csdn.net/zhangtingduo/article/details/133945890
https://baijiahao.baidu.com/s?id=1759085502704856128&wfr=spider&for=pc


http://www.ppmy.cn/devtools/14818.html

相关文章

数学建模完整版

模型与适用题型 微分方程传染病预测模型 神经网络 层次分析法 粒子群算法 matlab 优劣解距离法

[前端]NVM管理器安装、nodejs、npm、yarn配置

NVM管理器安装、nodejs、npm、yarn配置 NVM管理器安装 nvm(Node.js version manager) 是一个命令行应用,可以协助您快速地 更新、安装、使用、卸载 本机的全局 node.js 版本。 nvm下载地址:https://github.com/coreybutler/nvm-windows/releases 1.全部…

vue2使用elementUI报错

在vue2中安装elementUI,在全局引入elementUIcss的时候报错,解决办法是在根目录下新建一个名称为postcss.config.js文件 文件中放入代码: module.exports {plugins: {autoprefixer: {}} }重启项目就可以正常运行,elementUI的样式…

深入剖析Tomcat(四) 剖析Tomcat的默认连接器

上篇文章已经实现了一个简易版的连接器,理解了那个连接器,再看Tomcat的默认连接器就会轻松很多,本章中的默认连接器指的是Tomcat4的默认连接器,尽管该连接器已经被弃用了,被另一个运行速度更快的连接器 Coyote 取代&am…

MultiHeadAttention在Tensorflow中的实现原理

前言 通过这篇文章,你可以学习到Tensorflow实现MultiHeadAttention的底层原理。 一、MultiHeadAttention的本质内涵 1.Self_Atention机制 MultiHeadAttention是Self_Atention的多头堆嵌,有必要对Self_Atention机制进行一次深入浅出的理解,这…

MongoDB聚合运算符:$setDifference

MongoDB聚合运算符:$setDifference 文章目录 MongoDB聚合运算符:$setDifference语法使用举例 $setDifference聚合运算符比较两个数组,返回之前第一个数组中存在的元素,相当于返回第二个数组对于第一个数组的补集。 语法 { $setDi…

linux的“>”和“>>”

在Linux中,>和>>都是用于文件重定向的操作符,它们用于将命令的输出发送到文件中。 > 用于创建一个新文件或覆盖现有文件的内容。当你执行一个如 command > file.txt 的命令时,如果 file.txt 文件存在,它的内容将被…

<网络> HTTP

目录 前言: 一、再谈协议 (一)认识URL (二)Encode 和 Decode 二、HTTP 协议 (一)协议格式 (二)见一见请求 (三)见一见响应 三、模拟实现响…