Docker-stacks: Mount/Persist custom editor configs

Created on 2 Sep 2018  路  2Comments  路  Source: jupyter/docker-stacks

What docker image you are using?
jupyter/datascience-notebook

What complete docker command do you run to launch the container (omitting sensitive values)?

docker \
    run \
        --env JUPYTER_ENABLE_LAB=yes \
        --env NB_UID=`id -u` \
        --env NB_GID=`id -g` \
        --env GRANT_SUDO=yes \
        --interactive \
        --name "${jupyter_ctn_name}" \
        --publish 8888:8888 \
        --rm \
        --tty \
        --user root \
        --volume "${jupyter_work_dir}":/home/jovyan/work \
        jupyter/datascience-notebook

What steps do you take once the container is running to reproduce the issue?

  1. Go to http://127.0.0.1:8888
  2. For instance : Click Settings / JupyterLab Theme / JupyterLab Dark
  3. Kill then restart the container

What do you expect to happen?
I would like to persist editor configs.

What actually happens?
I can not find which file(s) I need to bind mount in order to persist my custom editor configs.

Question

Most helpful comment

Theme settings appear to be persisted in ~/.jupyter/lab/user-settings/@jupyterlab/ so you'll probably want to mount the entire /home/jovyan folder or have separate mounts for work and settings.

jovyan@jupyter-714c91cd28314fa31c4bd67ebc0453b8-2dvdg7b5pn:~/.jupyter/lab/user-settings/@jupyterlab/apputils-extension$ cat themes.jupyterlab-settings{
    // Theme
    // @jupyterlab/apputils-extension:themes
    // Theme manager settings.
    // *************************************

    // Selected Theme
    // [missing schema description]
    "theme": "JupyterLab Dark"
}jovyan@jupyter-714c91cd28314fa31c4bd67ebc0453b8-2dvdg7b5pn:~/.jupyter/lab/user-settings/@jupyterlab/apputils-extension$

Found by launching a jupyterlab instance on binder via https://gist.github.com/parente/714c91cd28314fa31c4bd67ebc0453b8.

All 2 comments

Theme settings appear to be persisted in ~/.jupyter/lab/user-settings/@jupyterlab/ so you'll probably want to mount the entire /home/jovyan folder or have separate mounts for work and settings.

jovyan@jupyter-714c91cd28314fa31c4bd67ebc0453b8-2dvdg7b5pn:~/.jupyter/lab/user-settings/@jupyterlab/apputils-extension$ cat themes.jupyterlab-settings{
    // Theme
    // @jupyterlab/apputils-extension:themes
    // Theme manager settings.
    // *************************************

    // Selected Theme
    // [missing schema description]
    "theme": "JupyterLab Dark"
}jovyan@jupyter-714c91cd28314fa31c4bd67ebc0453b8-2dvdg7b5pn:~/.jupyter/lab/user-settings/@jupyterlab/apputils-extension$

Found by launching a jupyterlab instance on binder via https://gist.github.com/parente/714c91cd28314fa31c4bd67ebc0453b8.

I didn't know about Binder, thank you for sharing and above all, for perfectly answering the question, I am now able to persist my configs! :grin:

Was this page helpful?
0 / 5 - 0 ratings