0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Jupyter Notebookをターミナルで実行

Last updated at Posted at 2018-08-17

目的

GPUサーバーでjupyter notebookが実行できるように、ターミナルでコマンドを打ち込んで実行して結果を元ノートブックに残すこと。

コマンド

jupyter nbconvert --execute --to notebook --inplace <notebook>

参照:https://stackoverflow.com/questions/35545402/how-to-run-an-ipynb-jupyter-notebook-from-terminal

timeout問題

一つセルの実行時間がデフォルト30秒と限定され、長く延ばすためにコンフィグファイルの修正が必要となります。
~/.jupyter/jupyter_nbconvert_config.py というファイルを開い、無ければ作成し、下記を書き込むこと。

c = get_config()

c.ExecutePreprocessor.timeout = 600

上記の場合は実行時間上限を600秒と設定しました。-1と設定すれば限定なし。

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?