八十七 docker Jupyterlab

安装docker  Jupyterlab

docker run -i -t -d --name ubuntuJupyter02 -p 8005:8005 --privileged=true -v /opt/weiqi/Jupyter:/opt/weiqi/Jupyter ubuntu

docker exec -it ubuntuJupyter02 /bin/bash

chmod 777 /tmp

apt-get update --allow-unauthenticated

apt-get update

apt-get install vim

apt-get update && apt-get install python3 -y && apt-get install python3-pip -y

python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple jupyterlab ipython jupyterlab-language-pack-zh-CN

ipython

from notebook.auth import passwd

passwd()

123456

123456

exit

jupyter lab --generate-config

vi /root/.jupyter/jupyter_notebook_config.py

#将ip设置为*,意味允许任何IP访问

c.NotebookApp.ip = '*'

#这里的密码就是上边我们生成的那一串

c.NotebookApp.password = 'sha1:f704b702aea2:01e2bd991f9c7208ba177b46f4d10b6907810927'

#服务器上并没有浏览器可以供Jupyter打开

c.NotebookApp.open_browser = False

#监听端口设置为8888或其他自己喜欢的端口

c.NotebookApp.port = 8005

#允许远程访问

c.NotebookApp.allow_remote_access = True

c.NotebookApp.notebook_dir = '/opt/weiqi/Jupyter'

jupyter lab --allow-root

nohup jupyter lab --allow-root &

python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple crypto pycryptodome requests

http://192.168.1.210:8005

123456

效果图:

你可能感兴趣的:(八十七 docker Jupyterlab)