Help us understand the problem. What is going on with this article?

リモートサーバでjupyter notebookを起動させローカル環境で使う

More than 1 year has passed since last update.

やりたいこと

  1. 高性能GPU搭載サーバに自分のmacでリモート接続(今回はローカルLAN環境)
  2. リモート上でJupyter Notebookを起動しプログラムの実装・実行

環境

Python 3.5.2
macOS Sierra 10.12.6

実装

まずJupyter Notebookをインストール
pip install jupyter

ipythonを起動してJupyterログイン時のパスワードを設定

$ ipython

In [1]: from notebook.auth import passwd

In [2]: passwd()
Enter password: [パスワードを入力]
Verify password: [パスワードを再度入力]
Out[2]: 'sha1: [ハッシュ化されたパスワード]'

外部接続環境用の設定ファイルを作成

$ mkdir ~/.jupyter
$ vim ~/.jupyter/jupyter_notebook_config.py
jupyter_notebook_config.py
c = get_config()

# Notebook上でplotを表示できるようにする
c.IPKernelApp.pylab = 'inline'
# 全てのIPから接続を許可
c.NotebookApp.ip = '*'
# IPython notebookのログインパスワード
c.NotebookApp.password = 'sha1:[ハッシュ化されたパスワード]'
# 起動時にブラウザを起動させるかの設定
c.NotebookApp.open_browser = False
# ポート指定
c.NotebookApp.port = [接続ポート]

Jupyter起動
jupyter notebook

リモートサーバからhttp://[all ip addresses on your system]:[接続ポート]/に接続してねと言われるので接続する。
設定したパスワードを入力してログインする。

終わりに

Jupyter Notebookで効率的なプログラミングライフを目指しましょー。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした