Select JupyterLab Theme automatically when the docker starts

I created customized Dockerfile on top of the jupyter/scipy-notebook image and then copy extension sources to /home/jovyan/extension folder. It is available from the GUI via Settings → JupyterLab Theme → theme_name, but how to apply that automatically when we run the container? After running jt -t theme_name I’m getting:

(base) jovyan@d8335162a538:~$ jt -t theme_name
Didn't recognize theme name: theme_name
Available Themes: 
   chesterish
   grade3
   gruvboxd
   gruvboxl
   monokai
   oceans16
   onedork
   solarizedd
   solarizedl

In your docker build, you can bake in an ${NB_PREFIX}/share/jupyter/lab/settings/overrides.json (docs):

{
 "@jupyterlab/apputils-extension:themes": {
    "theme": "JupyterLab Dark",
    "theme-scrollbars": true
  }
}
3 Likes