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

jupyter を docker で起動後に、token 確認するコマンド

More than 1 year has passed since last update.


jupyter を docker で常時起動する。

docker run -it -d --name jupyter -p 8888:8888 -v $(pwd):/home/jovyan --restart=always -v ~/.config/gcloud:/home/jovyan/gcloud

ログを見て token 取得する。

$ docker logs jupyter
[C 07:06:02.298 NotebookApp]

    To access the notebook, open this file in a browser:
    Or copy and paste one of these URLs:
        http://(e22198a8202b or

上記の をブラウザで開いて作業開始。


docker 起動しっぱなしなので後日 localhost 開こうとすると token 違うって怒られることがある。こういうときは docker コンテナに入って token 確認しないといけない。


$ docker ps -a
CONTAINER ID        IMAGE                          COMMAND                  CREATED             STATUS              PORTS                    NAMES
e22198a8202b        jupyter/datascience-notebook   "tini -g -- start-no…"   6 weeks ago         Up 3 weeks>8888/tcp   jupyter


$ docker exec -it jupyter /bin/bash

下のコマンドで token 確認する

jovyan@e22198a8202b:~$ jupyter notebook list
Currently running servers: :: /home/jovyan
jovyan@e22198a8202b:~$ exit を開いて作業再開。

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