How to enable JupyterLab extension manager by default?

Viewed 699

I am deploying a JupyterLab environment in Docker, to save my preferred working environment. One of the customizations is that I have an extension jupyterlab-onedarkpro installed. This offers the JupyterLab web app a new theme.

Problem

However, in the Dockerfile, as I built the image by using the following codes, I still need to

  1. open the JupyterLab web app,
  2. manually enable the extensions from extension manager,
  3. search for jupyterlab-onedarkpro in extension manager,
  4. install it (which should be done by the bash script but seems actually not)
  5. click rebuild as the web app suggests.
# In Dockerfile
# <jupyter> is the conda env where I installed the jupyterlab only.
RUN conda run -n jupyter /bin/bash extensions.sh

# In extensions.sh
conda install -c conda-forge -y nodejs

jupyter labextension install -y \
    @jupyterlab/application \
    @jupyterlab/apputils \
    @jupyterlab/console \
    @jupyterlab/coreutils \
    @jupyterlab/docmanager \
    @jupyterlab/filebrowser \
    @jupyterlab/mainmenu \
    @jupyterlab/notebook \
    @jupyterlab/rendermime \
    @jupyterlab/rendermime-interfaces \
    react \
    react-dom \
    @jupyterlab/debugger \
    @jupyterlab/toc \
    jupyterlab-spreadsheet \
    jupyterlab_voyager \
    @mflevine/jupyterlab_html \
    jupyterlab_onedarkpro

conda install -c conda-forge -y \
    jupyterlab-drawio \
    jupyterlab_execute_time \
    ipympl \
    plotly \
    jupyter-dash

pip install \
    jupyterlab-system-monitor \
    jupyterlab_latex

jupyter server extension disable nbclassic
npm run build
jupyter lab build

Question

How can I set the jupyterlab-onedarkpro extension to be enabled and the JupyterLab to be rebuilt in Dockerfile ?

0 Answers
Related