Skip to content
Snippets Groups Projects
Verified Commit 71e43e68 authored by Olivier Benz's avatar Olivier Benz
Browse files

Update base image to debian:12

- base: Use Zsh as default shell for NB_USER
- base: Add 'Resource Monitor' extension
parent 5222c7ce
No related branches found
No related tags found
No related merge requests found
Showing
with 39 additions and 20 deletions
......@@ -4,7 +4,9 @@ Topmost entry = Tag `latest`
| Python | Jupyter Hub | Jupyter Lab | code‑server (Code) | Git | Git LFS | Pandoc | Quarto[^2] | CTAN date[^2] | Linux distro |
|:-----------|:------------|:------------|:-------------------|:-------|:--------|:-------|:------------|:--------------|:-------------|
| 3.11.4 | 4.0.1 | 3.6.4 | 4.13.0 (1.78.2) | 2.41.0 | 3.3.0 | 3.1.1 | 1.3.361 | | Debian 11 |
| 3.11.4 | 4.0.1 | 3.6.4 | 4.13.0 (1.78.2) | 2.41.0 | 3.3.0 | 3.1.1 | 1.3.361 | | Debian 12 |
| 3.11.3 | 4.0.0 | 3.6.4 | 4.13.0 (1.78.2) | 2.41.0 | 3.3.0 | 3.1.1 | 1.3.361 | 2023‑06‑06 | Debian 11 |
| 3.10.12 | 4.0.0 | 3.6.4 | 4.13.0 (1.78.2) | 2.41.0 | 3.3.0 | 3.1.1 | 1.3.361 | 2023‑06‑06 | Debian 11 |
| 3.11.2[^1] | 3.1.1 | 3.6.3 | 4.9.1 (1.73.1) | 2.40.0 | 3.3.0 | 2.19.2 | 1.2.475[^3] | 2023‑04‑05 | Debian 11 |
| 3.10.11 | 3.1.1 | 3.6.3 | 4.9.1 (1.73.1) | 2.40.0 | 3.3.0 | 2.19.2 | 1.2.475[^3] | 2023‑04‑05 | Debian 11 |
| 3.11.1[^1] | 3.1.1 | 3.5.3 | 4.9.1 (1.73.1) | 2.39.1 | 3.3.0 | 2.19.2 | 1.2.335[^3] | 2023‑02‑08 | Debian 11 |
......
......@@ -210,7 +210,8 @@ RUN mkdir /opt/code-server \
$HOME/.local
## Install JupyterLab
RUN pip install \
RUN export PIP_BREAK_SYSTEM_PACKAGES=1 \
&& pip install \
jupyter-server-proxy \
jupyterhub==${JUPYTERHUB_VERSION} \
jupyterlab==${JUPYTERLAB_VERSION} \
......
......@@ -215,7 +215,8 @@ RUN mkdir /opt/code-server \
$HOME/.local
## Install JupyterLab
RUN pip install \
RUN export PIP_BREAK_SYSTEM_PACKAGES=1 \
&& pip install \
jupyter-server-proxy \
jupyterhub==${JUPYTERHUB_VERSION} \
jupyterlab==${JUPYTERLAB_VERSION} \
......
......@@ -222,7 +222,8 @@ RUN mkdir /opt/code-server \
${HOME}/.local
## Install JupyterLab
RUN pip install \
RUN export PIP_BREAK_SYSTEM_PACKAGES=1 \
&& pip install \
jupyter-server-proxy \
jupyterhub==${JUPYTERHUB_VERSION} \
jupyterlab==${JUPYTERLAB_VERSION} \
......
......@@ -201,7 +201,8 @@ RUN mkdir /opt/code-server \
$HOME/.local
## Install JupyterLab
RUN pip install \
RUN export PIP_BREAK_SYSTEM_PACKAGES=1 \
&& pip install \
jupyter-server-proxy \
jupyterhub==${JUPYTERHUB_VERSION} \
jupyterlab==${JUPYTERLAB_VERSION} \
......
......@@ -205,7 +205,8 @@ RUN mkdir /opt/code-server \
$HOME/.local
## Install JupyterLab
RUN pip install \
RUN export PIP_BREAK_SYSTEM_PACKAGES=1 \
&& pip install \
jupyter-server-proxy \
jupyterhub==${JUPYTERHUB_VERSION} \
jupyterlab==${JUPYTERLAB_VERSION} \
......
......@@ -210,7 +210,8 @@ RUN mkdir /opt/code-server \
$HOME/.local
## Install JupyterLab
RUN pip install \
RUN export PIP_BREAK_SYSTEM_PACKAGES=1 \
&& pip install \
jupyter-server-proxy \
jupyterhub==${JUPYTERHUB_VERSION} \
jupyterlab==${JUPYTERLAB_VERSION} \
......
......@@ -215,7 +215,8 @@ RUN mkdir /opt/code-server \
$HOME/.local
## Install JupyterLab
RUN pip install \
RUN export PIP_BREAK_SYSTEM_PACKAGES=1 \
&& pip install \
jupyter-server-proxy \
jupyterhub==${JUPYTERHUB_VERSION} \
jupyterlab==${JUPYTERLAB_VERSION} \
......
......@@ -222,7 +222,8 @@ RUN mkdir /opt/code-server \
${HOME}/.local
## Install JupyterLab
RUN pip install \
RUN export PIP_BREAK_SYSTEM_PACKAGES=1 \
&& pip install \
jupyter-server-proxy \
jupyterhub==${JUPYTERHUB_VERSION} \
jupyterlab==${JUPYTERLAB_VERSION} \
......
# Copyright (c) 2022 b-data GmbH.
# Distributed under the terms of the MIT License.
c.InlineBackend.figure_formats = {"svg", "pdf"}
import os
if (
os.path.exists(os.path.join(os.environ["HOME"], "bin"))
and not os.path.join(os.environ["HOME"], "bin") in os.getenv("PATH")
and not os.path.join(os.environ["HOME"], "bin") in os.getenv("PATH", "")
):
os.environ["PATH"] = (
os.path.join(os.environ["HOME"], "bin")
......@@ -17,7 +14,8 @@ if (
if (
os.path.exists(os.path.join(os.environ["HOME"], ".local", "bin"))
and not os.path.join(os.environ["HOME"], ".local", "bin") in os.getenv("PATH")
and not os.path.join(os.environ["HOME"], ".local", "bin")
in os.getenv("PATH", "")
):
os.environ["PATH"] = (
os.path.join(os.environ["HOME"], ".local", "bin")
......
......@@ -12,6 +12,8 @@
"graph": false
}
},
"resmon.show.battery": false,
"resmon.show.cpufreq": false,
"telemetry.telemetryLevel": "off",
"terminal.integrated.fontFamily": "MesloLGS NF",
"workbench.colorTheme": "Default Dark+"
......
ARG BASE_IMAGE=debian
ARG BASE_IMAGE_TAG=bullseye
ARG BASE_IMAGE_TAG=12
ARG BUILD_ON_IMAGE=glcr.b-data.ch/python/ver
ARG PYTHON_VERSION
ARG CUDA_IMAGE_FLAVOR
......@@ -172,7 +172,7 @@ RUN dpkgArch="$(dpkg --print-architecture)" \
sed -i 's/.*pam_limits.so/#&/g' /etc/pam.d/sudo-i; \
fi \
## Add user
&& useradd -l -m -s /bin/bash -N -u ${NB_UID} ${NB_USER} \
&& useradd -l -m -s $(which zsh) -N -u ${NB_UID} ${NB_USER} \
&& mkdir -p /var/backups/skel \
&& chown ${NB_UID}:${NB_GID} /var/backups/skel \
## Install Tini
......@@ -203,6 +203,8 @@ RUN mkdir /opt/code-server \
&& code-server --extensions-dir ${CODE_BUILTIN_EXTENSIONS_DIR} --install-extension alefragnani.project-manager-12.7.0.vsix \
&& curl -sLO https://dl.b-data.ch/vsix/piotrpalarz.vscode-gitignore-generator-1.0.3.vsix \
&& code-server --extensions-dir ${CODE_BUILTIN_EXTENSIONS_DIR} --install-extension piotrpalarz.vscode-gitignore-generator-1.0.3.vsix \
&& curl -sLO https://dl.b-data.ch/vsix/mutantdino.resourcemonitor-1.0.7.vsix \
&& code-server --extensions-dir ${CODE_BUILTIN_EXTENSIONS_DIR} --install-extension mutantdino.resourcemonitor-1.0.7.vsix \
&& code-server --extensions-dir ${CODE_BUILTIN_EXTENSIONS_DIR} --install-extension GitLab.gitlab-workflow \
&& code-server --extensions-dir ${CODE_BUILTIN_EXTENSIONS_DIR} --install-extension ms-python.python \
&& code-server --extensions-dir ${CODE_BUILTIN_EXTENSIONS_DIR} --install-extension ms-toolsai.jupyter \
......@@ -222,7 +224,8 @@ RUN mkdir /opt/code-server \
${HOME}/.local
## Install JupyterLab
RUN pip install \
RUN export PIP_BREAK_SYSTEM_PACKAGES=1 \
&& pip install \
jupyter-server-proxy \
jupyterhub==${JUPYTERHUB_VERSION} \
jupyterlab==${JUPYTERLAB_VERSION} \
......
......@@ -103,7 +103,7 @@ if [ "$(id -u)" == 0 ] ; then
fi
# Recreate the desired user as we want it
userdel "${NB_USER}"
useradd --home "/home/${NB_USER}" --shell /bin/bash --uid "${NB_UID}" --gid "${NB_GID}" --groups 100 --no-log-init "${NB_USER}"
useradd --home "/home/${NB_USER}" --shell "$(which zsh)" --uid "${NB_UID}" --gid "${NB_GID}" --groups 100 --no-log-init "${NB_USER}"
fi
# Move or symlink the jovyan home directory to the desired users home
......@@ -238,7 +238,7 @@ else
# We cannot use "sed --in-place" since sed tries to create a temp file in
# /etc/ and we may not have write access. Apply sed on our own temp file:
sed --expression="s/^jovyan:/nayvoj:/" /etc/passwd > /tmp/passwd
echo "${NB_USER}:x:$(id -u):$(id -g):,,,:/home/jovyan:/bin/bash" >> /tmp/passwd
echo "${NB_USER}:x:$(id -u):$(id -g):,,,:/home/jovyan:$(which zsh)" >> /tmp/passwd
cat /tmp/passwd > /etc/passwd
rm /tmp/passwd
......
ARG BASE_IMAGE=debian
ARG BASE_IMAGE_TAG=bullseye
ARG BASE_IMAGE_TAG=12
ARG BUILD_ON_IMAGE
ARG PYTHON_VERSION
......
......@@ -84,6 +84,7 @@ RUN dpkgArch="$(dpkg --print-architecture)" \
&& chmod -R g+w /opt/TinyTeX \
&& chmod -R g+wx /opt/TinyTeX/bin \
## Install Python packages
&& export PIP_BREAK_SYSTEM_PACKAGES=1 \
&& pip install \
altair \
beautifulsoup4 \
......
......@@ -84,6 +84,7 @@ RUN dpkgArch="$(dpkg --print-architecture)" \
&& chmod -R g+w /opt/TinyTeX \
&& chmod -R g+wx /opt/TinyTeX/bin \
## Install Python packages
&& export PIP_BREAK_SYSTEM_PACKAGES=1 \
&& pip install \
altair \
beautifulsoup4 \
......
......@@ -87,6 +87,7 @@ RUN dpkgArch="$(dpkg --print-architecture)" \
/etc/fonts/conf.d/09-texlive.conf \
&& fc-cache -fsv \
## Install Python packages
&& export PIP_BREAK_SYSTEM_PACKAGES=1 \
&& pip install \
altair \
beautifulsoup4 \
......
......@@ -74,6 +74,7 @@ RUN dpkgArch="$(dpkg --print-architecture)" \
&& chmod -R g+w /opt/TinyTeX \
&& chmod -R g+wx /opt/TinyTeX/bin \
## Install Python packages
&& export PIP_BREAK_SYSTEM_PACKAGES=1 \
&& pip install \
altair \
beautifulsoup4 \
......
......@@ -75,6 +75,7 @@ RUN dpkgArch="$(dpkg --print-architecture)" \
&& chmod -R g+w /opt/TinyTeX \
&& chmod -R g+wx /opt/TinyTeX/bin \
## Install Python packages
&& export PIP_BREAK_SYSTEM_PACKAGES=1 \
&& pip install \
altair \
beautifulsoup4 \
......
......@@ -75,6 +75,7 @@ RUN dpkgArch="$(dpkg --print-architecture)" \
&& chmod -R g+w /opt/TinyTeX \
&& chmod -R g+wx /opt/TinyTeX/bin \
## Install Python packages
&& export PIP_BREAK_SYSTEM_PACKAGES=1 \
&& pip install \
altair \
beautifulsoup4 \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment