I want to darken JupiterLab with the command.

Asked 1 years ago, Updated 1 years ago, 76 views

I would like to use JupiterLab using Docker on WSL2 of Win10.
At this time, I would like to avoid putting the container into dark mode every time I start it.

So, just like putting Jupiter notebook in dark mode,

jt-tonedork-fs95-altp-tfs11-nfs115-cellw88%-T

after jupyter lab
Booted as , but did not enter dark mode.
I was able to turn it into dark mode using the mouse.

Is it possible to set it to dark mode with the command?

Thank you for your cooperation.

add

Docker image launching vim key-bound JupiterLab with a black background - Qiita

Using the above page as a reference, I added the command in Dockerfile of Kaggle Python (Docker image), but it didn't work (see supplement below), so
I created the memes.jupyterlab-settings file in the .jupyter folder in the folder to be mounted and wrote {"theme":"JupyterLab Dark"} but it did not go into dark mode at startup.
It doesn't seem to reflect the settings, but how can it be reflected?

re-add

I tried writing {"theme":"JupyterLab Dark"} from Dockerfile to echo, but it didn't change either.
/tmp/working/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/themes.jupyterlab-settings
folder configuration.

Supplementary
If you paste the above link directly into the Dockerfile, it looks like the following and it doesn't seem to work.
Since there is nothing in particular about mkdir, can I see that it is going well?
Does themes.jupyterlab-settings mean I have to create an empty file before echoing?

Step 40/42: RUN mkdir-p/home/jovyan/.jupyter/lab/user-settings/@jupyterlab/apputils-extension
 --- Running in 24cc635c44ee
Removing intermediate container 24cc635c44ee
 --- >ba8a1b1e09a3
Step 41/42: RUN echo' {"theme": "JupyterLab Dark"}'>/home/jovyan/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/themes.jupyterlab-settings
 --- Running in 099d05db7ca3
/bin/sh:1:cannot create/home/jovyan/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/themes.jupyterlab-settings—Directory nonexistent
The command '/bin/sh-cecho' {"theme": "JupyterLab Dark"}'>/home/jovyan/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/themes.jupyterlab-settings' returned a non-zero code:2

re-supplement
I tried ./build --gpu as the root user, but
If you don't add the -p option to mkdir, you won't get an error, but it doesn't seem to change that the directory is not generated.
#You can create other users without any deep meaning, but

USER root

RUN groupadd student & useradd-m-g student student
RUN mkdir/home/student/notebooks
RUN chown-R student:student/home#Plug-in installation requires permissions below /home/jovyan

I also wrote it in Dockerfile, but it doesn't change.

python docker wsl jupyter-lab

2022-09-30 18:12

1 Answers

I don't know the details of where to put it on the Docker image, so this is a partial answer.

If you look at the JupyterLab document, if you want to enable dark mode, you can write the following in a file called overrides.json and place it under <sys-prefix>/share/jupyter/lab/settings/.

{
  "@jupyterlab/apputils-extension:themes":{
    "theme": "JupyterLab Dark"
  }
}

Also, <sys-prefix> can be verified by executing jupyter lab path in the command.

reference:
JupyterLab User Settings File-Stack Overflow Answer


2022-09-30 18:12

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.