LoginSignup
3
3

More than 3 years have passed since last update.

Tensorflow Dockerでjupyter notebookを使う

Posted at

docker runで起動

公式サイトにあるように、jupyterのタグが付いたイメージをpullして、下記のようにrunすれば、jupyter notebookが起動する。

$ docker run -it -p 8888:8888 tensorflow/tensorflow:nightly-py3-jupyter

ホストのウェブブラウザでhttp://127.0.0.1:8888/?token=...を開く。
/tfがルートとして開く。

コンテナ内で bash シェル セッションを開始後に起動

コンテナ内で bash シェル セッションを開始する。

$ docker run -it -p 8888:8888 tensorflow/tensorflow:nightly-py3-jupyter bash

コンテナ内で下記のコマンドを実行して、jupyter notebookが起動する。

# jupyter notebook --port 8888 --ip=0.0.0.0 --allow-root

ホストのウェブブラウザでhttp://127.0.0.1:8888/?token=...を開く。
コンテナ内の任意のディレクトリをルートとして、jupyter notebookが起動することができる。

(上の例では、jupyter付きのイメージを使っているが、jupyterなしのイメージを起動後にpipで入れた場合でも可能。)

参考

https://qiita.com/tand826/items/0c478bf63ead75427782
https://qiita.com/ciela/items/0e0392f600c92b93d7c6

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