bradlee
    • 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 No publishing access yet

      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.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      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 No publishing access yet

    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.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    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
    ###### tags: `OneAI 使用手册` `TWCC`  [OneAI 文件](/s/xKNcU3O5D) # 筆記本服務 ==筆記本服務基於 [Jupyter 組件](https://jupyter.org/) 之上,預先提供數個在深度學習及資訊科學方面常見的開發框架,並可讓使用者在建立筆記本服務的過程中透過提供 [requirements.txt](https://pip.pypa.io/en/stable/reference/requirements-file-format/#example "pip requirements.txt 官方範例") 安裝所需特定 python 套件,然後就可以安全快速地進入[JupyterLab 互動式開發環境](https://jupyterlab.readthedocs.io/en/stable/ "JupyterLab 官方文件")。== ## 建立筆記本服務 * 從服務列表點選「**筆記本服務**」,在「**筆記本服務**」頁面點擊「**+建立**」。 ![](/uploads/upload_d95d8873976d87bbde81b1580738d7da.png) #### 1. 基本資訊 * 填寫名稱、描述並選擇開發框架,接著點擊「**下一步:硬體設定>**」。 ![](/uploads/upload_14c30cb3a91c3df158f6fa840c6f37d6.png) :::info :bulb: **提示:開發框架** 系統目前提供的人工智慧開發框架及軟體如下: | | TensorFlow | PyTorch | MXNet | CUDA | DataScience | PySpark | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | JupyterLab 版本| 2.x | 2.x | 2.x | 3.x | 3.x | 3.x | |預設 Packages| AIMaker,<br> boto3 | AIMaker,<br> boto3 | AIMaker,<br> boto3 | AIMaker,<br> boto3,<br> Numba, <br> xeus-cling | AIMaker,<br> boto3 | AIMaker,<br> boto3 | |擴充套件| Elyra,<br>TensorBoard | Elyra,<br>TensorBoard | Elyra,<br> TensorBoard | Elyra | Elyra| Elyra | |使用語言| Python | Python | Python | Python | Python,<br>R,<br>Julia | Python | |映像檔 來源 | [NVIDIA-NGC-TensorFlow](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/tensorflow) | [NVIDIA-NGC-PyTorch](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch) | [NVIDIA-NGC-MXNet](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/mxnet) | [NVIDIA-NGC-CUDA](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/cuda) | [Jupyter-DataScience](https://hub.docker.com/r/jupyter/datascience-notebook/) | [Jupyter-PySpark](https://hub.docker.com/r/jupyter/pyspark-notebook) | ::: ==註記: 以上開發框架皆可以在無GPU硬體設定下正常使用,惟在 `Pytorch` 及 `MXNet` 開發框架內所含的範例程式需基於GPU硬體設定下方能正常運作,推薦使用GPU硬體設定進行相關體驗。 == #### 2. 硬體設定 * 依您的運算需求,選擇合適的硬體規格配置,亦可點擊「**查看目前已可用配額**」,檢視目前系統及專案的資源配額及已用量,接著點擊「**下一步:儲存>**」。 #### 3. 儲存 * 接著設定筆記本==服務==的儲存資訊,系統設定筆記本==服務==的預設路徑為 **`/workspace`**,故您至少須選擇一個儲存體掛載為 **`/workspace`**,作為筆記本==服務==的工作環境,完成後點擊「**下一步:變數設定>**」。點擊「**新增**」,可依需求增加掛載其他儲存體。 ![](/uploads/upload_7039d40250e19906361842a41f49f050.png) #### 4. 檢閱+建立 * 檢查筆記本服務的建立資訊,確定後點擊「**建立**」。 ## 筆記本==服務==管理 * 筆記本==服務==建立成功後會出現在筆記本服務列表,點擊該列表可查看筆記本==服務==的詳細資訊。 ![](/uploads/upload_01e925b02ced918930ef4e6b199cc874.png) * 進入筆記本服務詳細資料頁面,可以檢視筆記本==服務==的基本資訊、連線、儲存等設定,或透過上方的命令列圖示執行「**啟動**」、「**停止**」、「**編輯**」、「**删除**」及「**重新整理**」等功能。 ![](/uploads/upload_4f165af3a39f4f7c9235bd4c742218cb.png) ### 日誌 * 點擊「**查看日誌**」,可查看筆記本==服務==的日誌資訊。 ![](/uploads/upload_01f4b488f51e17d244490a491554dd25.png) ### 啟動 ==Jupyter Lab== * 在「**連線**」區塊,點擊「**啟動**」即可在瀏覽器中開啟 JupyterLab 服務。 ![](/uploads/upload_02b7918f22135770f343973c51947844.png) :::info :bulb: **提示:** 「**Launcher**」頁面所顯示的軟體選項會因為在建立筆記本服務時選擇的開發框架而不同。 ::: ![](/uploads/upload_cf7b2faed7970f000ae9e898f9c25015.png) :::info :bulb: **提示:** **JupyterLab** 的使用說明請參見 [**JupyterLab 官方文件**](https://jupyterlab.readthedocs.io/en/stable/index.html)。 ::: ## 修改筆記本服務設定 依使用上的需求,您可以隨時變更筆記本服務的設定,例如:選取更強大的硬體規格以提升運算效能、變更開發框架或掛載其他的資料儲存來源。 * 進入筆記本服務詳細資料頁面,點擊上方命令列 **編輯** 圖示。 ![](/uploads/upload_49cdaa8aa23ef013ab0ddbf0e67f70c4.png) * 編輯筆記本服務變更筆記本服務的描述、開發框架、硬體設定及儲存等設定,完成後點擊「**儲存編輯**」。 :::info :bulb: **提示:** 編輯筆記本服務設定前請先儲存您的文檔,編輯完成後服務需重啟才會生效。 ::: ## 安裝其他 Python 套件 如果您需要安裝其他開發所需的 Python 套件,可在筆記本根目錄下的 **requirements.txt** 中新增所需要的 Python 套件。**requirements.txt** 的格式可參見下方 Python 官方提供的 [**requirements.txt 範例**](https://pip.pypa.io/en/stable/reference/requirements-file-format/#example)。 ```= ###### Requirements without Version Specifiers ###### pytest pytest-cov beautifulsoup4 ###### Requirements with Version Specifiers ###### # See https://www.python.org/dev/peps/pep-0440/#version-specifiers docopt == 0.6.1 # Version Matching. Must be version 0.6.1 keyring >= 4.1.1 # Minimum version 4.1.1 coverage != 3.5 # Version Exclusion. Anything except version 3.5 Mopidy-Dirble ~= 1.1 # Compatible release. Same as >= 1.1, == 1.* ###### Refer to other requirements files ###### -r other-requirements.txt ###### A particular file ###### ./downloads/numpy-1.9.2-cp34-none-win32.whl http://wxpython.org/Phoenix/snapshot-builds/wxPython_Phoenix-3.0.3.dev1820+49a8884-cp34-none-win_amd64.whl ###### Additional Requirements without Version Specifiers ###### # Same as 1st section, just here to show that you can put things in any order. rejected green ``` * 修改並儲存 **requirements.txt** 後,需重新啟動筆記本服務才會安裝新增的套件。請關閉筆記本,回到筆記本服務詳細資料頁面,點擊上方的命令列「**停止**」圖示,稍後再點擊「**啟動**」。 ![](/uploads/upload_d2a62824c57170cd74434219a5b8628e.png) * 如果希望立即使用新的套件,可透過下列方式,安裝後再重啟核心(Restart Kernel)以確保成功滙入套件。 - 在 Python Notebook 中執行 **`%pip install -r requirements.txt`** - 在 JupyterLab 的 Terminal 中執行 **`pip install -r requirements.txt`** ![](/uploads/upload_58a56503a7f12bfbcbba5100fde87c02.png) ## 資源監控 * 從服務列表選單選擇「**資源監控**」進入資源監控服務頁面,再點選左側選單「**筆記本服務**」進入「**筆記本服務監控**」頁面。 * 筆記本服務監控提供筆記本服務的監控指標及使用量細節資訊,包括 CPU 使用量、GPU 使用量及記憶體使用量的監控儀表板。 ![](/uploads/upload_bf8c20d43b35b10d1fe15019a37a9f01.png) * 點選所有服務選單可篩選特定的服務名稱。 ![](/uploads/upload_c0f347d4ccea57d0b62fae42831b1cc7.png) ### 選擇特定期間 * 點選期間選單可篩選特定的期間,例如:1 天、7 天、14 天、1 個月、3 個月、6 個月、1 年或自訂。 ![](/uploads/upload_4bd71cbbae337bff3b86ffdcb48cc870.png) ### 使用量細節 * 點擊上方「**使用量細節**」可檢視筆記本服務的使用量細節。 ![](/uploads/upload_d6950b704f8a76849d0411fc9ea2fb0a.png) ==以下都是新增的情境== # 掛載雲端儲存空間的使用情境 ## 自動擴增開發環境所需 Python package 情境 預設提供的開發框架雖然滿足了大部分開發者所需的 Python packages,這裡還是提供一種方式來讓使用者增加額外的 Python package,讓筆記本服務啟動後將這些額外增添的 Python packages 也被安裝完畢。 ### 在建立筆記本服務過程安裝額外 Python Packages 此次情境透過放置 **requirements.txt** 到儲存體並掛載到工作區,可以快速重現使用者在其他開發環境安裝的 Python Packages。 1. 先在本地準備 [**requirements.txt**](https://pip.pypa.io/en/stable/reference/requirements-file-format/#example "可參考pip requirements.txt 官方範例"),寫入要額外安裝的 Python Packages。或者使用者在原本的開發環境直接透過 [pip freeze > requriements.txt](https://pip.pypa.io/en/stable/cli/pip_freeze/#examples "可參考pip freeze 官方說明") 產生 **requirements.txt**。 2. 到雲端儲存管理頁面[建立雲端儲存體](/s/_F4C_EzEa#建立儲存體 "建立儲存體的說明文檔"),假設該儲存體的名稱命名為 `mybucket`。 3. 將 **requirements.txt** [放入雲端儲存體](/s/_F4C_EzEa#上傳檔案 "將檔案上傳的方式教學"),也就是上傳到 `mybucket`。 4. 進入筆記本服務管理頁面按下 `建立` 按鈕開始設定筆記本服務流程。 5. 在建立過程的第三個步驟中,設定儲存的頁面, 預設至少必須掛載一個儲存體成為該筆記本服務工作空間,並且掛載路徑固定被命名為 `/workspace` ,接著在旁邊儲存欄位的下拉式選單中挑選剛剛所建立的 `mybucket` 儲存體。這樣的設定在筆記本服務成功啟動後,使用者在筆記本服務的工作空間(`/workspace`)做的所有關於檔案或目錄的相關處理動作, 就等同於直接是對雲端儲存體內(這裡的案例是 `mybucket`)做處理。 6. 當設定建立筆記本服務流程完成,該筆記本服務啟動後,由於在筆記本服務的工作區(`/workspace`,也就是 `mybucket` 儲存體)存在 **requirements.txt** ,所以會依 **requirements.txt** 中描述安裝 Python Packages ,接著就可以直接 import 使用。 ## 透過雲端儲存達成專案團隊共用資料集情境 一個專案團隊內可以透過不同的雲端儲存體來管理不同的資料集,在容器服務或者筆記本服務裏透過掛載雲端儲存體的方式來達到共用資料集的情境。 假設同一個專案內有 A,B 兩個模型開發小組基於同份資料集,根據各自擅長的開發框架來設計不同機器學習模型, 由資料維護小組負責維護資料集。 ### 資料維護小組準備資料集傳到雲端儲存體 1. 到雲端儲存管理頁面[建立雲端儲存體](/s/_F4C_EzEa#建立儲存體 "建立儲存體的說明文檔"), 假設該儲存體的名稱被命名為 `cat-images-dataset`。 2. 在 `cat-images-dataset` 儲存體中分別[建立兩個資料夾](/s/_F4C_EzEa#建立資料夾 "建立資料夾的說明文檔") `train` 及 `valid` 。 3. 分別進入 `train` 及 `valid` 資料夾,然後開始[上傳](/s/_F4C_EzEa#上傳檔案 "上傳檔案的說明文檔")訓練或驗證的圖案檔案。 ### 模型開發小組在各自的筆記本服務讀取共用的圖像資料進行訓練 A B 開發小組在各自建立筆記本服務的過程中,額外掛載 `cat-images-dataset` 儲存體。 1. 先到雲端儲存管理頁面[建立雲端儲存體](/s/_F4C_EzEa#建立儲存體 "建立儲存體的說明文檔") 準備用來放入各模型開發小組的開發程式碼並成為各自筆記本服務的工作區,假設 A 小組建立的儲存體命名為 `a-team-code` , B 小組建立的儲存體命名為 `b-team-code`。 2. A B 小組各自進入筆記本服務管理頁面按下 `建立` 按鈕開始設定筆記本服務流程。 3. 在建立筆記本服務過程的第三個步驟中,設定儲存的頁面,A B 小組在預設的掛載路徑 `/workspace` 各自挑選 `a-team-code` 或 `b-team-code` 儲存體來掛載, 成為該筆記本服務工作區並且用來放開發程式碼. 4. 在同個步驟,設定儲存頁面,按下 `新增` 按鈕來額外掛載資料維護小組所維護的資料集儲存體 `cat-images-dataset`,掛載路徑欄位填入 `/workspace/source_dataset` ,儲存體從下拉選單中挑選 `cat-images-dataset`。 5. 筆記本服務建立完成啟動後,進入 Jupyter 開發環境,開發小組就可以在各自筆記本服務裡的`/workspace/source_dataset` 目錄下讀取資料集來進行模型訓練。

    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
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    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