Sky Chu
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    * # 北榮Power AI容器使用者手冊(管理者用) ## 大綱 1. 登入AI Console 2. 修改使用者密碼 3. 預約使用容器 4. 建立容器服務 5. 建立與使用Power AI容器 6. 疑難排解 --- ## 登入AI Console 請從10.221.252.127:32666進到AI Console登入畫面,並透過從系統管理員申請下來的帳號密碼登入進AI Console環境,預設登入所使用的Login Type為Local。 ![](https://i.imgur.com/vl0KElo.png) --- ## 修改使用者密碼 :::warning 注意 :warning: 第一次登入本系統請務必先修改密碼 ::: 1. 點擊右上角的使用者名稱頭像模樣的下拉式選單,並點選Basic Info ![](https://i.imgur.com/LBwXv0v.png) 2. 點擊Password欄位右上角的鉛筆圖示,並照著左下角出現的視窗分別輸入原密碼以及要修改的密碼。 ![](https://i.imgur.com/Hhfmdoi.png) ![](https://i.imgur.com/uZ0hDi6.png) --- ## 預約使用容器 本系統具備預約功能,每位使用者可自行選擇要預約使用容器的時間 在使用容器服務前,請務必先行預約,否則無法順利建立容器。 :::info 備註 :information_source: 可預約使用容器的最長區間係由管理員決定,若需要更長的使用區間,請通知相關管理單位 ::: :::warning 注意 :warning: 一旦預約時間到期,除無法再建立容器服務外,原先存在的容器也會被清除,因此無論運算是否有跑完,都請在預約時間快到前,結束運算並保存好當前運算資料,以避免因使用時間到期清除容器而造成資料損毀或遺失。 ::: 1. 點擊頁面左邊的Reservation,進入到Reservation頁面 2. 點擊畫面右上角的Create Reservation ![](https://i.imgur.com/ysPEKkE.png) 3. 出現選擇日期與時間的對話框,請點擊下圖紅色匡起來的區域,即可點開日期表格 同時請留意上面的Available Duration Time,此為顯示最短與最長可預約時間 ![](https://i.imgur.com/XGGo2he.png) 4. 出現月曆後,先選擇開始日期,比如要選10月8日就點擊10月8日位置 ![](https://i.imgur.com/C8JQufq.png) 第一次點擊後,接著選擇結束的日期,假設選擇在10月9日結束就點擊10月9日,若為當天則再點擊一次10月8日 選擇好日期範圍後,右下角的select time會轉為藍色,點擊即可切換到時間選擇區塊 ![](https://i.imgur.com/EzewAV9.png) 接著選擇開始時間與結束時間,**需注意開始時間不得等於或早於當下的時間**,比如當下的時間是10/8 14:00,則開始時間不得為當日的14:00或是13:50 另外所設定的時間範圍也必須符合Available Duration Time所規範的時間範圍。 ![](https://i.imgur.com/pNTn44U.png) 若需要再調整日期,可以點擊select date,切換回月曆選項設定 完成後點擊OK即出現下圖確認畫面,確認無誤後點擊Submit ![](https://i.imgur.com/gxBKL5c.png) 5. 接著會在右下角出現下圖視窗,請依照下圖紅字提示填入相關資訊 當點擊到GPU Number時會顯示該時段剩餘可預約的GPU數量 設定完畢後點擊Submit送出預約 ![](https://i.imgur.com/AP2ZQz8.png) :::info 備註 :information_source: 可預約使用的最多GPU數量係由管理員決定,若欲使用的時段與其他使用者所預約的時段有重疊,則會顯示該時段剩餘可預約的GPU數量 ::: 6. 送出後,即可在清單內看到剛剛送出的預約 ![](https://i.imgur.com/8wleOdf.png) 每一個預約都有其自己的運行狀態,下表為預約狀態說明: | 狀態 | 說明 | |:--------:|:---------:| | STANDBY | 此預約尚未到開始時間 | | STARTING | 此預約正在時段範圍內 | | FINISHED | 此預約已過了預約時段 | 7. 若要刪除預約,勾選要刪除的預約,並且點擊右上角的垃圾桶圖示 ![](https://i.imgur.com/caj4H98.png) :::warning 注意 :warning: 只有STANDBY與FINISHED狀態的預約才可以刪除,無法刪除正在運行中(STARTING)的預約 ::: --- ## 建立與使用Power AI容器 設定好預約後,即可開始建立Power AI容器 1. 請進入到Container > Container Service頁面,並點右上角的Create Container ![](https://i.imgur.com/e5240cu.png) 2. Solution清單請選擇Power AI ![](https://i.imgur.com/OzAMDFl.png) 3. 請依照下圖標示填入相關的建立資訊,完畢後點擊Next **a. 填入容器名稱** ![](https://i.imgur.com/G1qFvaT.png) **b. 建立Power AI容器要使用的image與資源規格** ![](https://i.imgur.com/rmn3rGK.png) | 類型 | 說明 | |:--------:|:--------| | Image | 選擇要使用何種版本的Power AI映像檔,除了有個別區分Power AI自身版本外還有區分Python版本。 | | Flavor | 建立容器時所使用的資源規格 | | Password | 設定Jupyter與SSH連線的密碼 | | Availability_Zone | 要使用的預設資源區域,預設只有training | :::info 備註 :information_source: 不同的Power AI版本所包含的AI套件版本請參考以下網站。[https://hub.docker.com/r/ibmcom/powerai](https://hub.docker.com/r/ibmcom/powerai) ::: :::warning 注意 :warning: 若沒有先預約或預約時間未到,則Availability_Zone內會沒有選項可選,導致無法建立容器 請先至Reservation預約GPU使用時間 ::: **c. NFS連線資訊,這步請直接略過** ![](https://i.imgur.com/DOs0t2q.png) 4. 最終頁面,確認所填的資訊皆無誤後,點Submit ![](https://i.imgur.com/bT5ve5b.png) 5. 當建立好的容器顯示Ready,即可點擊Container名稱,會在下排顯示具體資訊 ![](https://i.imgur.com/jVUCdlt.png) 6. 切換到Service Info頁籤,可以找到連線資訊,每一個IP+Port號碼後面所標示的連線服務都不同 ![](https://i.imgur.com/HiTKZZz.png) | 連線類型 | 說明 | |:--------:|:---------:| | SSH | 可使用PuTTY等終端機工具連入到容器內做指令操作,無法直接點擊網址連入 | | JupyterLab | 可直接點擊網址連入,即可用瀏覽器打開此容器的Jupyterlab網頁 | :::info 備註 :information_source: 1. 若使用的Power AI版本為1.6.2以上,SSH預設的登入使用者名稱為pwrai;若為1.6.1以下則為root 2. 預設的SSH及Jupyterlab登入密碼為一開始建立容器時所輸入的密碼 ::: --- ### Power AI容器使用特別說明 (1) - 檔案放置 在容器內使用相關AI工具,與一般在實體機器直接使用AI工具有些許不同,以下將說明檔案放置時需要注意的部分 由於容器內的檔案系統是臨時建立的空間,一旦容器因手動刪除或出現問題而重新建立,放置在容器內的個人資料也會被刪除。 為了避免使用者的資料因容器重建而遺失,以下將說明個人檔案在容器內的放置位置 在本平台中,每位使用者都有自己的放置空間,其放置位置為環境內的NFS伺服器上;在建立容器的同時會自動將使用者的資料夾掛載進容器內,同時使用者存放在此資料夾中的檔案在容器結束時也會保存在NFS伺服器中。 當使用者從Jupyterlab或SFTP連線軟體登入時,會看到根目錄有兩個資料夾 ![](https://i.imgur.com/VWmgNse.png) | 資料夾路徑 | 說明 | |:--------|:--------| | ```/jupenv``` | 使用者檔案放置位置,可在此存取自己的資料 | | ```/jupenv_libs``` | 開放使用的AI訓練程式庫,只能讀取無法寫入,由平台管理者維護 | 若要上傳檔案,請先進入到```/jupenv```目錄內,並使用兩種方式上傳檔案 * Jupyterlab:直接點擊上方的上傳按鈕,將檔案上傳進資料夾內 ![](https://i.imgur.com/Omh7663.png) * SFTP:可使用如Filezilla等支援SFTP傳輸的軟體,透過SSH連線將檔案上傳 ![](https://i.imgur.com/mpysQYQ.png) :::info 備註:information_source: 初次使用時,可能會遇到沒辦法上傳檔案的狀況,情況為上傳時出現```Permission denied```或者是```Operation not permitted```的問題 若遇到這樣的狀況,可打開Jupyterlab的Termainal視窗或者是使用SSH軟體,輸入以下指令 ``` sudo chown -R pwrai: /jupenv ``` (若使用1.6.1以前的版本則請改成root) ::: --- ### Power AI容器使用特別說明 (2) - AI套件安裝 在使用本容器做AI相關訓練時,針對不同的AI訓練功能與情境,可能會需要特定的Python套件。若要安裝套件,可使用```conda install```或者是```pip3 install```來安裝需要的Python套件。 另外Power AI容器本身是以Ubuntu 18.04為基底製作(1.6.0版本以前為Ubuntu 16.04),若要安裝其他的Ubuntu套件也可直接使用```apt-get install```進行安裝。 :::warning 注意 :warning: 本平台所運行的環境為PowerPC(ppc64),所能安裝的Ubuntu套件不一定與Intel/AMD(amd64)的環境相同。 ::: 此外,由於每次容器刪除重建後,預先安裝的套件也會被清除而需要重新安裝,若有需要快速重裝的需求,建議將需要用到的Python套件也一併放進個人資料夾內,以確保下一次使用時能夠快速建立好環境。 :::success 提示 :pencil: 在Jupyterlab的notebook檔案中,可透過在前面加入"!"的方式,加入```apt-get install```或```conda install```等bash指令,即可做到一系列的安裝流程以及無接縫的AI作業。 如: ``` !apt-get install build-essential ``` ::: --- ## 案例實作:以PowerAI上的TensorFlow進行stack_model運算 1. 登入AI Console後,先預約GPU使用時間,點選左側Reservation進入預約畫面,並建立預約![](https://i.imgur.com/SFIaWTT.png) 2. 建立PowerAI容器,使用1.7.0-py37版本,在使用預約的GPU數目建立容器,並留意忽略NFS設定![](https://i.imgur.com/14Ifyl0.png) 3. 建立完成後,即可透過得到的jupyterlab連線網址,並以自己所設定的建立密碼登入Jupyterlab網頁![](https://i.imgur.com/Rn9wGzl.png)![](https://i.imgur.com/3jAF69L.png) 4. 登入後可見到`jupenv`及`jupenv_libs`兩個資料夾![](https://i.imgur.com/zECSY0J.png) 進入到`jupenv`內,把要用來做AI運算的相關檔案,比如辨識用圖檔、程式碼等,透過下圖黃色標示的圖示分別建立想要放置的資料夾,並上傳檔案![](https://i.imgur.com/ILGBnzR.png) 5. 建立一個名為`Demo.ipynb`的檔案,並寫入stack_model相關程式碼 匯入相關python module及package 定義路徑與參數 6. 接著對應程式碼的檔案讀取內容建立名為`data`的資料夾,進入該資料夾後,點選上面的上傳圖示,將相關的分析圖檔上傳至資料夾內。 :::success 提示:pencil: 若檔案很多,也可以上傳壓縮檔案後用指令解開,或者是使用SFTP傳輸工具上傳 ::: 7. 根據程式碼的需求,在建立相對應的資料夾,並將input data上傳到相對應的資料夾內,完成後即可開始執行。 8. 根據程式碼的執行結果,可以在notebook上直接看到輸出的結果,同時也可以在一同建立的`output`資料夾內找到輸出的結果圖片 之後便可以直接下載這些結果圖,完成AI分析內容 --- ## 疑難排解 * **Q:當我要把檔案上傳或者建立新的檔案在自己的資料夾上時都會出現```Permission denied```之類的錯誤。** A: 這問題是沒有設定好`/jupenv`資料夾的擁有者權限所導致,請打開Jupyterlab中的Terminal或以SSH連線軟體連進容器內,並透過以下指令修改成正確的擁有者 ``` sudo chown -R pwrai: /jupenv ``` 若問題還是沒有解決,則再輸入以下指令 ``` sudo chmod -R 777 /jupenv ``` * **Q:我正在跑一個AI訓練,但總是會在特定的地方不再有反應,並且Jupyterlab顯示斷線;雖然過了幾十秒後連線就恢復了,但我發現剛剛運行的AI訓練又變成還沒開始跑的狀態,看起來像整個環境被重置的感覺。請問是什麼問題呢?** A:這個問題通常是因為跑的AI訓練所使用的記憶體資源過大,超出了建立容器時的規格,導致系統認定容器資源超用而緊急停止並重建容器的狀況,請重新開一個資源更大的容器;若發現當前最高的可選資源無法滿足需求時,請聯絡系統管理員。 * **Q:我忘記了我建立容器時所使用的密碼,請問我要怎麼找?** A:點擊自己的容器後,從下方彈出的視窗選擇Parameter頁籤,即可找到容器的密碼。

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully