jupyterhub 安装配置
安装
- 安装 anaconda3, 从https://www.anaconda.com/distribution/下载. 国内有代理,见这里 但不如官网新.
- 安装
sudo /opt/anaconda3/bin/pip install jupyterhub - 参考github上jupyterhub的说明, 在/opt/nodejs 目录中安装
npm install configurable-http-proxy
配置
- 以下前两个配置更新为:
xyq@xyq-linux:~/.jupyter$ sed '/^#/d;/^$/d' /etc/jupyterhub/jupyterhub_config.py
c.JupyterHub.base_url = '/jupyter'
c.Authenticator.admin_users = set(['zkk','xyq'])
xyq@xyq-linux:~/.jupyter$ cat run_hub
#!/bin/bash
export PATH=/opt/anaconda3/bin:/opt/nodejs/node_modules/.bin:$PATH
cd /home/xyq/.jupyter
jupyterhub --config=/etc/jupyterhub/jupyterhub_config.py --port=8888 --no-ssl
- jupyterhub配置文件
sed '/^#/d;/^$/d' /etc/jupyterhub/jupyterhub.py
c.JupyterHub.port=8888
c.JupyterHub.proxy_cmd = ['/opt/nodejs/bin/configurable-http-proxy',]
c.Authenticator.admin_users =['zkk','xyq']
c.JupyterHub.base_url = '/jupyter'
- 启动脚本,注意添加路径
xyq@xyq-linux ~/.jupyter $ cat run_hub
#!/bin/bash
export PATH=/opt/anaconda3/bin:/usr/lib/rstudio-server/bin/pandoc:$PATH
cd /home/xyq/.jupyter
#nohup jupyterhub --config=/etc/jupyterhub/jupyterhub.py --no-ssl > run_hub.log 2>&1 &
jupyterhub --config=/etc/jupyterhub/jupyterhub.py --no-ssl
- 开机启动配置
sudo cat /etc/systemd/system/jupyterhub.service
[Unit]
Description=Jupyterhub
After=syslog.target network.target
[Service]
User=root
ExecStart=/home/xyq/.jupyter/run_hub
[Install]
WantedBy=multi-user.target
- 启动
sudo systemctl enable jupyterhub # 开机自启动
sudo systemctl daemon-reload # 加载配置文件
sudo systemctl start jupyterhub # 启动
sudo journalctl -u jupyterhub # 查看log
log操作, 更多命令
sudo journalctl --since yesterday -u jupyterhub
sudo journalctl --vacuum-size=1G
sudo journalctl --vacuum-time=1days
nginx 配置
sed '/ *#/d;/^$/d' /etc/nginx/sites-enabled/default
upstream ipython_server {
server 127.0.0.1:8888;
}
upstream r_server {
server 127.0.0.1:800;
}
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
try_files $uri $uri/ =404;
}
location /jupyter/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_pass http://ipython_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /r/ {
rewrite ^/r/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:800;
proxy_redirect http://127.0.0.1:800/ $scheme://$host/r/;
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
jupyterhub 安装配置的更多相关文章
- 实验室工作站jupyterhub安装笔记
本篇文章为实验室工作站的jupyterhub安装配置笔记,由于软硬件等各种区别,安装过程难免有所区别,仅供大家参考. 实验室新到一台深度学习工作站,原本想装一个juoyter notebook直接开干 ...
- Hive安装配置指北(含Hive Metastore详解)
个人主页: http://www.linbingdong.com 本文介绍Hive安装配置的整个过程,包括MySQL.Hive及Metastore的安装配置,并分析了Metastore三种配置方式的区 ...
- Hive on Spark安装配置详解(都是坑啊)
个人主页:http://www.linbingdong.com 简书地址:http://www.jianshu.com/p/a7f75b868568 简介 本文主要记录如何安装配置Hive on Sp ...
- ADFS3.0与SharePoint2013安装配置(原创)
现在越来越多的企业使用ADFS作为单点登录,我希望今天的内容能帮助大家了解如何配置ADFS和SharePoint 2013.安装配置SharePoint2013这块就不做具体描述了,今天主要讲一下怎么 ...
- Hadoop的学习--安装配置与使用
安装配置 系统:Ubuntu14.04 java:1.7.0_75 相关资料 官网 下载地址 官网文档 安装 我们需要关闭掉防火墙,命令如下: sudo ufw disable 下载2.6.5的版本, ...
- redis的安装配置
主要讲下redis的安装配置,以及以服务的方式启动redis 1.下载最新版本的redis-3.0.7 到http://redis.io/download中下载最新版的redis-3.0.7 下载后 ...
- Windows环境下的NodeJS+NPM+Bower安装配置
npm作为一个NodeJS的模块管理,之前我由于没有系统地看资料所以导致安装配置模块的时候走了一大段弯路,所以现在很有必要列出来记录下.我们要先配置npm的全局模块的存放路径以及cache的路径,例如 ...
- ubuntu kylin 14.04安装配置MongoDB v2.6.1(转)
1.获取最新版本 https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.1.tgz 2.解压并进入bin目录 tar zxvf mongo ...
- Django基础之安装配置
安装配置 一 MVC和MTV模式 著名的MVC模式:所谓MVC就是把web应用分为模型(M),控制器(C),视图(V)三层:他们之间以一种插件似的,松耦合的方式连接在一起. 模型负责业务对象与数据库的 ...
随机推荐
- Dubbo与SpringCloud
dubbo和springcloud都是微服务框架,各自有各自的注册中心. dubbo监控中心:zookeeper,redis 提供高性能和透明化的RPC远程调用方案,SOA服务治理方案. 核心部分: ...
- JS - 局部方法改变全局变量的值
var a = "" function aa() { a="卡卡" } aa() // 注意,aa() 一定要执行,局部赋值全局变量才会有作用 aler ...
- 1、求loss:tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits, labels, name=None))
1.求loss: tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits, labels, name=None)) 第一个参数log ...
- 吴裕雄--天生自然 JAVASCRIPT开发学习:语句
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...
- Android群英传知识点回顾——第十章:Android性能优化
10.1 布局优化 10.1.1 Android UI渲染机制 10.1.2 避免Overdraw 10.1.3 优化布局层级 10.1.4 避免嵌套过多无用布局 10.1.5 Hierarchy V ...
- 启动运行python3时 UnicodeDecodeError: 'gbk' codec can't decode byte 0xa2 in position 170: illegal multibyte sequence
重现 在cmd中输入Python,运行后,出现以下错误: Python 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 64 bit (AMD64 ...
- JZOJ-2019-11-5 A组
T1 给定由 n 个点 m 条边组成的无向连通图,保证没有重边和自环. 你需要找出所有边,满足这些边恰好存在于一个简单环中.一个环被称为简单环,当且仅当它包含的所有点都只在这个环中被经过了一次.(即求 ...
- [CQOI2016]K远点对(KD-Tree)
暴力的做法应该是这样的,维护大小为k的堆,每次插入两点间距离并弹出堆顶. 然后这个做法显然是可以KD-Tree优化的,建立KD-Tree,然后如果该平面内最远点小于堆顶,则直接退出.就当做是复习很久没 ...
- 自己编写DLL并导出函数
sub.c #include<windows.h> #include"sub.h" int WINAPI DllMain(_In_ HANDLE _HDllHandle ...
- BZOJ [Cqoi2017] 小Q的棋盘
题解:枚举最后在哪里停止,然后剩下的步数/2 也就是找最大深度 枚举终止位置算是一种思路吧 #include<iostream> #include<cstdio> #inclu ...