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

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

More than 1 year has passed since last update.

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

JupyterLab

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

Jupyterの公式DockerイメージとJupyterLab

https://hub.docker.com/u/jupyter/

用途ごとに *-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)
Why do not you register as a user and use Qiita more conveniently?
  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
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