美文网首页
在服务器端安装jupyter notebook

在服务器端安装jupyter notebook

作者: 小光K | 来源:发表于2019-03-30 19:51 被阅读0次

从大佬那学习到的安装方法,记录一下

准备工作

  • ubuntu系统服务器
  • 装有Anaconda的容器
  • 容器在run时做好的端口映射

jupyter notebook 安装

登录服务器

ssh root(ubuntu)@主机名(ip)
输入服务器密码

查看容器提前做好的端口映射

docker ps # 查看服务器内容器信息,记下提前映射好的端口号

进入容器

docker exec -it (CONTAINER ID) /bin/bash # 进入容器

生成jupyter notebook配置文件

jupyter notebook --allow-root --generate-config

创建存放jupyter notebook代码的文件夹

cd /  # 回到根目录
mkdir 文件夹名 # 创建新文件夹
cd 文件夹名 # 进入新文件夹

启动jupyter notebook

jupyter notebook --ip=0.0.0.0 --allow-root 

如果想关闭终端后依旧在后台运行,在命令前加上nohup即可。

打开jupyter notebook

在本地浏览器中输入服务器主机ip:映射端口号,输入密码(token之后的数字字母序列)即可看到jupyter notebook页面

密码 jupyter notebook页面

为了避免每次复制密码,可以设置自己的密码,点击logout退出jupyter notebook,在一下页面设置。注意,密码设置需要重启jupyter notebook才能生效。

更改密码

参考文献:
登录服务器及一些操作
Dockerfile
ubuntu Anaconda 安装jupyter notebook

相关文章

网友评论

      本文标题:在服务器端安装jupyter notebook

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