0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Watson Studio で GPU を使用した Jupyter Notebook を使うには

Posted at

Watson Studio にはデフォルトで Python 環境 Runtime 24.1 on Python 3.11 が組み込まれています。

一方、GPUを使用したい場合(GPUを使用したJupyter Notebookを使用したい場合など)に必要なサービス Runtime 24.1 on Python 3.11 for GPU はデフォルトではインストールされていません。使用したい場合は別途インストールする必要があります。Runtime 24.1 on Python 3.11 for GPU をインストールしたうえで、新しい GPU 環境テンプレートを作成すると、GPU環境を使用できるようになります。

デフォルトの状態

デフォルトの状態では、GPU環境のテンプレートは存在せず、新規テンプレート からも GPU構成は選べません。
image.png

Runtime 24.1 on Python 3.11 for GPU のインストール

手順はこちらですが、IBM Software Hub の他のサービスと同様のインストール手順でインストールできます。

* インストールコマンドとしては、次のとおり components として、ws_runtimes を指定し、--extra-vars="cr_name=ibm-cpd-ws-runtime-241-pygpu" を指定しています。

cpd-cli manage apply-cr \
--components=ws_runtimes \
--release=${VERSION} \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--extra-vars="cr_name=ibm-cpd-ws-runtime-241-pygpu" \
--license_acceptance=true

この結果、cpd-cli manage get-cr-status で確認すると、デフォルトのRuntimeに加えて、GPU使用のRuntimeが追加されています(最終行)。

Component    CR Kind          CR Name                       Creation Timestamp    Namespace    Expected Version    Reconciled Version    Operator Information    Progress    Progress Message               Reconcile History    Status
-----------  ---------------  ----------------------------  --------------------  -----------  ------------------  --------------------  ----------------------  ----------  -----------------------------  -------------------  ---------
ws_runtimes  NotebookRuntime  ibm-cpd-ws-runtime-241-py     2025-02-17T01:44:59Z  wx           10.0.0              10.0.0                10.0.0034               100%        Last reconciliation succeeded  N/A                  Completed
ws_runtimes  NotebookRuntime  ibm-cpd-ws-runtime-241-pygpu  2025-02-27T00:48:38Z  wx           10.0.0              10.0.0                10.0.0034               100%        Last reconciliation succeeded  N/A                  Completed

GPU 環境テンプレートの作成

サービスのインストール後、新規テンプレート 作成画面では、Type で GPU を選択できるようになっています。GPUを選択すると、自動的にSoftware version に GPU Runtime 24.1 on Python 3.11 が選択されます。
image.png

image.png

テンプレート作成後、Notebook作成画面で、このランタイムを選択し使用できるようになります。
image.png

参考

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?