Docker安装Jupyterhub

1 新建volume映射文件夹

mkdir -p /opt/jupyterhub/jupyterhub

mkdir -p /opt/jupyterhub/home

2 运行容器

1
docker run -p 8000:8000 -d --name jupyterhub -v /opt/jupyterhub/jupyterhub:/srv/jupyterhub -v /opt/jupyterhub/home:/home --restart=always jupyterhub/jupyterhub jupyterhub

3 登陆docker 容器

docker exec -it jupyterhub bash

4 安装notebook

pip install notebook --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple

6 添加用户

useradd jupyterhub

passwd jupyterhub

7 退出交互界面 (ctrl + p + q)

sudo docker ps -a 查看容器运行状态

8 进入Jupyterhub

localhost:8000

Built with Hugo
Theme Stack designed by Jimmy