this question的答案指出,"JupyterLab黑暗“主题现在可以作为普通jupyter-lab安装的一部分。
我如何配置jupyter-lab,使其在第一次启动时已经应用了这个主题,所以我不必每次启动jupyter容器时都手动选择它?
发布于 2021-02-06 00:25:43
把这个放进~/.jupyterlab/user-settings/@jupyterlab/apputils-extension/themes.jupyterlab-settings
{
"theme": "JupyerLab Dark"
}在Dockerfile中,这可能类似于:
RUN mkdir -p ~/.jupyterlab/user-settings/@jupyterlab/apputils-extension/ && \
echo '{ "theme":"JupyterLab Dark" }' > themes.jupyterlab-settings发布于 2021-12-26 10:29:17
当我使用jupyter码头堆叠时,迈克的回答和MarkusOdenthal的评论对我不起作用,所以我寻找了一种不同的解决方案,使用overrides.json接缝是目前推荐的方法:
https://jupyterlab.readthedocs.io/en/stable/user/directories.html#overridesjson
简而言之:使用jupyter lab path检查应用程序目录,并放置一个名为overrides.json的文件,其中包含
{
"@jupyterlab/apputils-extension:themes": {
"theme": "JupyterLab Dark"
}
}进入<application directory>/settings/ (例如,用于正式的jupyter码头集装箱的/opt/conda/share/jupyter/lab/settings/ )
因此,如果您希望从jupyter获得带有暗主题的基本图像,Dockerfile将是
FROM jupyter/base-notebook
COPY overrides.json /opt/conda/share/jupyter/lab/settings/https://stackoverflow.com/questions/61973485
复制相似问题