JupyterLab

  • Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →
    歡迎大家來編輯!
  • Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →
    相信大家都使用過Jupyter NoteBook,這裡介紹的是JupyterLab,官方推薦使用
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

🔜快速介紹Jupyter

Jupyter 簡介—互動式的筆記本系統 from Chengtao Lin

🔌連線

使用網頁瀏覽器進行連線,請在網址列輸入對應到Container port-8888的埠號

140.123.111.143:[Port]

登入後輸入密碼即可開始使用。

🗂 工作資料夾WorkSpace

  1. Jupyter的根目錄,在/worksapce
  2. 要讀取ShareDataSet的資料路徑為/workspace/ShareDataSet/~
root@[ContainerID]:/workspace# tree
.
├── docker-examples
├── [User]
│   ├── File0
│   ├── File1
│   ├── File2
│   └── File3
├── nvidia-examples
├── README.md
└── ShareDataSet
    ├── DataSet0
    │   └── File0
    ├── DataSet1
    │   ├── File0
    │   ├── File1
    │   └── File2
    └── DataSet2
        ├── File0
        ├── File1
        ├── File2
        └── File3

🤮Jupyter Notebook水土不服解藥

目前預設啟動的是JupyterLab,如果你非常希望使用Jupyter Notebook;或在舊版本的Image(nvcr.io/nvidia/pytorch:19.09-py3)啟動JupyterLab有Bug,以下有兩種方法可以改回notebook:

1. 修改網址:

  • 可以將網址列的lab改為tree,就可切換成Jupyter Notebook;反之亦然:

2. 修改執行腳本:

  • 啟動ssh&jupyter服務的腳本放在/tmp/lab.sh,關閉jupyter服務後,修改腳本並執行即可永久改成Jupyter NoteBook
root@[ContainerID]:/workspace$ top |grep jupyter #找到jupyterlab root@[ContainerID]:/workspace$ kill $Jupyter_Service_PID root@[ContainerID]:/workspace$ sed -i 's/lab/notebook/g' /tmp/lab.sh root@[ContainerID]:/workspace$ sh /tmp/lab.sh
  • Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →
    若您ssh連線進去,發現錯誤訊息,請連繫IT,IT會用docker exec進入Container替您啟動。
-/tmp/lab.sh: line 1: jupyter: command not found
不過Jupyter Lab是下一代的Jupyter主力,轉換也不難,用了之後就知道!


👆堅持使用Jupyter NoteBook 的你👆

Jupyter使用參考資料

⭐JupyterLab 數據分析必備IDE完全指南
https://zhuanlan.zhihu.com/p/67959768

15個好用到爆炸的Jupyter Lab插件
https://zhuanlan.zhihu.com/p/101070029

tags: DgxGuide guide