14
12

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.

JupyterLab(β)をjupyterの公式Dockerイメージを使ってサクッと試す

Posted at

https://qiita.com/some-nyan/items/a4353cde6939e2dce351
を書いたあと、JupyterLabのβリリースがされていることに気づいてしまった。。。

JupyterLab

Jupyterの進化系、
Jupyterの機能に加えて、ファイルエクスプローラやコンソールも統合され
より統合開発環境として進歩している。

Jupyterの公式DockerイメージとJupyterLab

用途ごとに *-notebook というDockerイメージが公開されています。
JupyterLabのイメージないなぁと思ってREADME読んでたら、base-notebook
のREADMEにこんな一文が!

You can launch JupyterLab by setting JUPYTER_ENABLE_LAB:

やってみた

先日書いた、 docker-compose.yml に2行追加

version: '2.2'
services:
  jupyter:
    image: jupyter/datascience-notebook
    environment:
      JUPYTER_ENABLE_LAB: 1
    ports:
      - 8888:8888
    volumes:
      - ./:/home/jovyan/work
    command: start-notebook.sh --NotebookApp.token=''

すべての *-notebookbase-notebook から派生しているからいけるはず。。

$ docker-compose up
jupyter_1  | Container must be run with group root to update passwd file
jupyter_1  | Executing the command: jupyter lab --NotebookApp.token=
jupyter_1  | [I 00:34:53.528 LabApp] Writing notebook server cookie secret to /home/jovyan/.local/share/jupyter/runtime/notebook_cookie_secret
jupyter_1  | [W 00:34:54.294 LabApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
jupyter_1  | [W 00:34:54.294 LabApp] WARNING: The notebook server is listening on all IP addresses and not using authentication. This is highly insecure and not recommended.
jupyter_1  | [I 00:34:54.325 LabApp] JupyterLab beta preview extension loaded from /opt/conda/lib/python3.6/site-packages/jupyterlab
jupyter_1  | [I 00:34:54.325 LabApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
jupyter_1  | [I 00:34:54.338 LabApp] Serving notebooks from local directory: /home/jovyan
jupyter_1  | [I 00:34:54.339 LabApp] 0 active kernels
jupyter_1  | [I 00:34:54.339 LabApp] The Jupyter Notebook is running at:
jupyter_1  | [I 00:34:54.339 LabApp] http://[all ip addresses on your system]:8888/
jupyter_1  | [I 00:34:54.339 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

それっぽいこと言ってる!

アクセスしてみた

image.png

やったね!

ちなみに

2/28の時点では
0.31.8 が使われていた。

jovyan@65fb03dc67e3:~$ pip list | grep lab
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your p
ip.conf under the [list] section) to disable this warning.
jupyterlab (0.31.8)
jupyterlab-launcher (0.10.4)
14
12
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
14
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?