安裝docker? Jupyterlab
<!--創(chuàng)建ubuntu鏡像太防,設(shè)置端口饺鹃,設(shè)置映射囊陡,外加重命名-->
docker run -i -t -d --name ubuntuJupyter02 -p 8005:8005 --privileged=true -v /opt/weiqi/Jupyter:/opt/weiqi/Jupyter ubuntu
<!--進(jìn)入鏡像中-->
docker exec -it ubuntuJupyter02 /bin/bash
<!--下載 vi-->
chmod 777 /tmp
apt-get update --allow-unauthenticated
apt-get update
apt-get install vim
<!--下載 python3 環(huán)境-->
apt-get update && apt-get install python3 -y && apt-get install python3-pip -y
<!--下載 jupyterlab凭语,下載 ipython,下載jupyterlab-language-pack-zh-CN【中文包】-->
python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple jupyterlab ipython jupyterlab-language-pack-zh-CN
<!--進(jìn)入 ipython 中薄啥,設(shè)置密碼辕羽,并復(fù)制密碼備用-->
ipython
from notebook.auth import passwd
passwd()
123456
123456
exit
<!--生成 jupyterlab 配置文件:-->
jupyter lab --generate-config
<!--修改配置文件:-->
vi /root/.jupyter/jupyter_notebook_config.py
<!--更改內(nèi)容如下:-->
#將ip設(shè)置為*,意味允許任何IP訪問
c.NotebookApp.ip = '*'
#這里的密碼就是上邊我們生成的那一串
c.NotebookApp.password = 'sha1:f704b702aea2:01e2bd991f9c7208ba177b46f4d10b6907810927'
#服務(wù)器上并沒有瀏覽器可以供Jupyter打開
c.NotebookApp.open_browser = False
#監(jiān)聽端口設(shè)置為8888或其他自己喜歡的端口
c.NotebookApp.port = 8005
#允許遠(yuǎn)程訪問
c.NotebookApp.allow_remote_access = True
c.NotebookApp.notebook_dir = '/opt/weiqi/Jupyter'
<!--jupyter lab啟動jupyter服務(wù)即可:-->
jupyter lab --allow-root
<!--無命令行模式-->
nohup jupyter lab --allow-root &
<!--下載 python 所需要的包-->
python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple crypto pycryptodome requests
<!--進(jìn)入鏈接垄惧,輸入鏈接密碼刁愿,進(jìn)行使用-->
http://192.168.1.210:8005
123456
效果圖: