Skip to content

Instantly share code, notes, and snippets.

@ogawa
Last active November 11, 2020 04:11
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ogawa/ff25c5a9e4feb18aea17ba1ea4942b0a to your computer and use it in GitHub Desktop.
Save ogawa/ff25c5a9e4feb18aea17ba1ea4942b0a to your computer and use it in GitHub Desktop.

ABCIでのJupyter notebook利用

概要

このメモでは、ABCIでのJupyter notebookの利用方法について説明します。

以下の説明はmacOSを対象とします。macOSでは、デフォルトでOpenSSH 7.3以降がインストールされています。また、ABCI上でのPython環境の作り方などの説明は省略します。

開始手順

  • ABCIにログインします。
[user@localmachine] $ ssh -J %r@as.abci.ai abciuser@es
  • On-demandで、ノード専有で1ノード確保してログインします。
[abciuser@esX ~] $ qrsh -g abcigroup -l rt_F=1
  • jupyter-notebookを起動します。
[abciuser@gXXXX ~] $ jupyter-notebook
    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://(gXXXX.abci.local or 127.0.0.1):8888/?token=<token>
  • ローカルマシンからポートフォワードの設定を行います。
[user@localmachine] $ ssh -N -L 8888:gXXX.abci.local:8888 -J %r@as.abci.ai abciuser@es

これでローカルマシンの8888にアクセスすると、Jupyter notebookに接続できるようになります。

  • Webブラウザでアクセスします。
[user@localmachine] $ open http://127.0.0.1:8888/?token=<token>

終了手順

  • exitします。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment