Skip to content

Commit d0ed581

Browse files
committed
Configure JupyterLab defaults in Docker image
Disable announcements and enable line numbers for notebooks, file editor, and console cells
1 parent a5cff61 commit d0ed581

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

Dockerfile

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,28 @@ COPY --chown=${NB_USER}:users examples /home/${NB_USER}/examples
66
RUN cd /home/${NB_USER}/src && \
77
python -m pip install --upgrade pip && \
88
python -m pip install . --group docker && \
9-
python -m pip check
9+
python -m pip check && \
10+
jupyter labextension disable --level=sys_prefix "@jupyterlab/apputils-extension:announcements" && \
11+
mkdir -p /opt/conda/share/jupyter/lab/settings && \
12+
cat > /opt/conda/share/jupyter/lab/settings/overrides.json <<'EOF'
13+
{
14+
"@jupyterlab/notebook-extension:tracker": {
15+
"codeCellConfig": {
16+
"lineNumbers": true
17+
}
18+
},
19+
"@jupyterlab/fileeditor-extension:plugin": {
20+
"editorConfig": {
21+
"lineNumbers": true
22+
}
23+
},
24+
"@jupyterlab/console-extension:tracker": {
25+
"promptCellConfig": {
26+
"lineNumbers": true
27+
}
28+
}
29+
}
30+
EOF
1031

1132
RUN cd /home/${NB_USER}/examples && \
1233
jupytext --to ipynb *.md && \

0 commit comments

Comments
 (0)