diff --git a/keras3-cpu/Dockerfile b/keras3-cpu/Dockerfile index 1dcf0d94e627a57ee74a74fa3c2a7b26c3b109cb..bb0e19b84e1b6adee9849d662e365a9f530fc565 100644 --- a/keras3-cpu/Dockerfile +++ b/keras3-cpu/Dockerfile @@ -12,15 +12,16 @@ USER root RUN apt-get update --yes && \ apt-get install --yes --no-install-recommends \ # general purpose utils - iputils-ping \ + git-lfs \ htop \ + iputils-ping \ # R pre-requisites fonts-dejavu \ - unixodbc \ - unixodbc-dev \ - r-cran-rodbc \ + gcc \ gfortran \ - gcc && \ + r-cran-rodbc \ + unixodbc \ + unixodbc-dev && \ apt-get clean && rm -rf /var/lib/apt/lists/* USER ${NB_UID} @@ -60,7 +61,7 @@ RUN mamba install --yes \ USER root # install code-server and extensions -ENV CODE_VERSION=4.95.3 +ENV CODE_VERSION=4.96.2 RUN wget --no-hsts -q https://github.com/coder/code-server/releases/download/v$CODE_VERSION/code-server_${CODE_VERSION}_amd64.deb && \ dpkg -i code-server_${CODE_VERSION}_amd64.deb && \ rm -f code-server_${CODE_VERSION}_amd64.deb && \ @@ -80,7 +81,9 @@ RUN wget --no-hsts -q -O vscode_cli.tar.gz 'https://code.visualstudio.com/sha/do tar -xf vscode_cli.tar.gz --directory /usr/local/bin && \ rm vscode_cli.tar.gz && \ chown ${NB_USER} /usr/local/bin/code && \ - fix-permissions /usr/local/bin/code + fix-permissions /usr/local/bin/code && \ + # fix issue with permissions of /opt/conda/share/gdb/auto-load/opt + fix-permissions "${CONDA_DIR}" # install some packages USER ${NB_UID} @@ -148,6 +151,8 @@ USER root # activate extensions by default COPY plugin.jupyterlab-settings "/home/${NB_USER}/.jupyter/lab/user-settings/@jupyterlab/extensionmanager-extension/" COPY plugin.jupyterlab-settings "/home/${NB_USER}/.jupyter/lab/user-settings/@jupyter-server/resource-usage/" +# source mamba.sh in bash using /etc/profile.d/conda.sh (workaround for removed mamba init --system, see https://github.com/mamba-org/mamba/issues/3691) +COPY conda.sh "/etc/profile.d/" RUN chown -R ${NB_USER} "/home/${NB_USER}/.jupyter" && \ # history search with Page Up/Down sed -i "s/^# \(.*history-search.*\)/\1/" /etc/inputrc && \ @@ -162,6 +167,7 @@ RUN chown -R ${NB_USER} "/home/${NB_USER}/.jupyter" && \ mkdir -p /etc/skel/.cache && \ cp -r "/home/${NB_USER}/.cache/matplotlib" /etc/skel/.cache/ && \ # stuff + mkdir -p "/home/${NB_USER}/.conda" && \ cp -r "/home/${NB_USER}/.conda" "/home/${NB_USER}/.config" "/home/${NB_USER}/.jupyter" /etc/skel/ && \ # VS Code extension "gitlab-workflow", default gitlab server: gitlab.cvh-server.de printf '%s\n' \ @@ -173,8 +179,6 @@ RUN chown -R ${NB_USER} "/home/${NB_USER}/.jupyter" && \ ' fi' \ 'done' \ >> /usr/local/bin/start-notebook.d/fix-gitlab-server.sh && \ - # source mamba.sh in bash using /etc/profile.d/conda.sh - mamba init --system && \ chown -R ${NB_USER} "/home/${NB_USER}/.local" && \ fix-permissions "/home/${NB_USER}" && \ fix-permissions "/etc/skel" diff --git a/keras3-cpu/conda.sh b/keras3-cpu/conda.sh new file mode 100644 index 0000000000000000000000000000000000000000..824b6ce4e88321561297b7ac6b29f19303c93686 --- /dev/null +++ b/keras3-cpu/conda.sh @@ -0,0 +1,18 @@ +# >>> conda initialize >>> +# !! Contents within this block are managed by 'conda init' !! +__conda_setup="$('/opt/conda/bin/conda' 'shell.posix' 'hook' 2> /dev/null)" +if [ $? -eq 0 ]; then + eval "$__conda_setup" +else + if [ -f "/opt/conda/etc/profile.d/conda.sh" ]; then + . "/opt/conda/etc/profile.d/conda.sh" + else + export PATH="/opt/conda/bin:$PATH" + fi +fi +unset __conda_setup + +if [ -f "/opt/conda/etc/profile.d/mamba.sh" ]; then + . "/opt/conda/etc/profile.d/mamba.sh" +fi +# <<< conda initialize <<< diff --git a/keras3-gpu/Dockerfile b/keras3-gpu/Dockerfile index e237d45a5c9226d51d08900f4405ff701bccf7b3..b2a38e38799eed692334aed4de5b4e9e3fff6445 100644 --- a/keras3-gpu/Dockerfile +++ b/keras3-gpu/Dockerfile @@ -12,12 +12,13 @@ USER root # general purpose utils RUN apt-get update --yes && \ apt-get install --yes --no-install-recommends \ - iputils-ping \ - htop && \ + git-lfs \ + htop \ + iputils-ping && \ apt-get clean && rm -rf /var/lib/apt/lists/* # install code-server and extensions -ENV CODE_VERSION=4.95.3 +ENV CODE_VERSION=4.96.2 RUN wget --no-hsts -q https://github.com/coder/code-server/releases/download/v$CODE_VERSION/code-server_${CODE_VERSION}_amd64.deb && \ dpkg -i code-server_${CODE_VERSION}_amd64.deb && \ rm -f code-server_${CODE_VERSION}_amd64.deb && \ @@ -35,7 +36,9 @@ RUN wget --no-hsts -q -O vscode_cli.tar.gz 'https://code.visualstudio.com/sha/do tar -xf vscode_cli.tar.gz --directory /usr/local/bin && \ rm vscode_cli.tar.gz && \ chown ${NB_USER} /usr/local/bin/code && \ - fix-permissions /usr/local/bin/code + fix-permissions /usr/local/bin/code && \ + # fix issue with permissions of /opt/conda/share/gdb/auto-load/opt + fix-permissions "${CONDA_DIR}" # install some packages USER ${NB_UID} @@ -109,6 +112,8 @@ RUN pip install --no-cache-dir \ USER root # activate extensions by default COPY plugin.jupyterlab-settings "/home/${NB_USER}/.jupyter/lab/user-settings/@jupyterlab/extensionmanager-extension/" +# source mamba.sh in bash using /etc/profile.d/conda.sh (workaround for removed mamba init --system, see https://github.com/mamba-org/mamba/issues/3691) +COPY conda.sh "/etc/profile.d/" RUN chown -R ${NB_USER} "/home/${NB_USER}/.jupyter" && \ # history search with Page Up/Down sed -i "s/^# \(.*history-search.*\)/\1/" /etc/inputrc && \ @@ -123,6 +128,7 @@ RUN chown -R ${NB_USER} "/home/${NB_USER}/.jupyter" && \ mkdir -p /etc/skel/.cache && \ cp -r "/home/${NB_USER}/.cache/matplotlib" /etc/skel/.cache/ && \ # stuff + mkdir -p "/home/${NB_USER}/.conda" && \ cp -r "/home/${NB_USER}/.conda" "/home/${NB_USER}/.config" "/home/${NB_USER}/.jupyter" /etc/skel/ && \ # VS Code extension "gitlab-workflow", default gitlab server: gitlab.cvh-server.de printf '%s\n' \ @@ -134,8 +140,6 @@ RUN chown -R ${NB_USER} "/home/${NB_USER}/.jupyter" && \ ' fi' \ 'done' \ >> /usr/local/bin/start-notebook.d/fix-gitlab-server.sh && \ - # source mamba.sh in bash using /etc/profile.d/conda.sh - mamba init --system && \ chown -R ${NB_USER} "/home/${NB_USER}/.local" && \ fix-permissions "/home/${NB_USER}" && \ fix-permissions "/etc/skel" diff --git a/keras3-gpu/conda.sh b/keras3-gpu/conda.sh new file mode 100644 index 0000000000000000000000000000000000000000..824b6ce4e88321561297b7ac6b29f19303c93686 --- /dev/null +++ b/keras3-gpu/conda.sh @@ -0,0 +1,18 @@ +# >>> conda initialize >>> +# !! Contents within this block are managed by 'conda init' !! +__conda_setup="$('/opt/conda/bin/conda' 'shell.posix' 'hook' 2> /dev/null)" +if [ $? -eq 0 ]; then + eval "$__conda_setup" +else + if [ -f "/opt/conda/etc/profile.d/conda.sh" ]; then + . "/opt/conda/etc/profile.d/conda.sh" + else + export PATH="/opt/conda/bin:$PATH" + fi +fi +unset __conda_setup + +if [ -f "/opt/conda/etc/profile.d/mamba.sh" ]; then + . "/opt/conda/etc/profile.d/mamba.sh" +fi +# <<< conda initialize <<< diff --git a/pytorch-gpu/Dockerfile b/pytorch-gpu/Dockerfile index 53e2af3fd2295d433c1615b6baa306773e355343..a992f321f5a29ca52e05716e4686b4656b5ba35f 100644 --- a/pytorch-gpu/Dockerfile +++ b/pytorch-gpu/Dockerfile @@ -12,12 +12,13 @@ USER root # general purpose utils RUN apt-get update --yes && \ apt-get install --yes --no-install-recommends \ - iputils-ping \ - htop && \ + git-lfs \ + htop \ + iputils-ping && \ apt-get clean && rm -rf /var/lib/apt/lists/* # install code-server and extensions -ENV CODE_VERSION=4.95.3 +ENV CODE_VERSION=4.96.2 RUN wget --no-hsts -q https://github.com/coder/code-server/releases/download/v$CODE_VERSION/code-server_${CODE_VERSION}_amd64.deb && \ dpkg -i code-server_${CODE_VERSION}_amd64.deb && \ rm -f code-server_${CODE_VERSION}_amd64.deb && \ @@ -35,7 +36,9 @@ RUN wget --no-hsts -q -O vscode_cli.tar.gz 'https://code.visualstudio.com/sha/do tar -xf vscode_cli.tar.gz --directory /usr/local/bin && \ rm vscode_cli.tar.gz && \ chown ${NB_USER} /usr/local/bin/code && \ - fix-permissions /usr/local/bin/code + fix-permissions /usr/local/bin/code && \ + # fix issue with permissions of /opt/conda/share/gdb/auto-load/opt + fix-permissions "${CONDA_DIR}" # install some packages # NOTE: without --no-update-deps somehow an undefined symbol error in /opt/conda/lib/python3.11/lib-dynload/_sqlite3.cpython-311-x86_64-linux-gnu.so occurs, which crashes jupyter lab. @@ -109,6 +112,8 @@ RUN conda install --yes --no-update-deps \ USER root # activate extensions by default COPY plugin.jupyterlab-settings "/home/${NB_USER}/.jupyter/lab/user-settings/@jupyterlab/extensionmanager-extension/" +# source mamba.sh in bash using /etc/profile.d/conda.sh (workaround for removed mamba init --system, see https://github.com/mamba-org/mamba/issues/3691) +COPY conda.sh "/etc/profile.d/" RUN chown -R ${NB_USER} "/home/${NB_USER}/.jupyter" && \ # history search with Page Up/Down sed -i "s/^# \(.*history-search.*\)/\1/" /etc/inputrc && \ @@ -123,6 +128,7 @@ RUN chown -R ${NB_USER} "/home/${NB_USER}/.jupyter" && \ mkdir -p /etc/skel/.cache && \ cp -r "/home/${NB_USER}/.cache/matplotlib" /etc/skel/.cache/ && \ # stuff + mkdir -p "/home/${NB_USER}/.conda" && \ cp -r "/home/${NB_USER}/.conda" "/home/${NB_USER}/.config" "/home/${NB_USER}/.jupyter" /etc/skel/ && \ # VS Code extension "gitlab-workflow", default gitlab server: gitlab.cvh-server.de printf '%s\n' \ @@ -134,8 +140,6 @@ RUN chown -R ${NB_USER} "/home/${NB_USER}/.jupyter" && \ ' fi' \ 'done' \ >> /usr/local/bin/start-notebook.d/fix-gitlab-server.sh && \ - # source mamba.sh in bash using /etc/profile.d/conda.sh - mamba init --system && \ chown -R ${NB_USER} "/home/${NB_USER}/.local" && \ fix-permissions "/home/${NB_USER}" && \ fix-permissions "/etc/skel" diff --git a/pytorch-gpu/conda.sh b/pytorch-gpu/conda.sh new file mode 100644 index 0000000000000000000000000000000000000000..824b6ce4e88321561297b7ac6b29f19303c93686 --- /dev/null +++ b/pytorch-gpu/conda.sh @@ -0,0 +1,18 @@ +# >>> conda initialize >>> +# !! Contents within this block are managed by 'conda init' !! +__conda_setup="$('/opt/conda/bin/conda' 'shell.posix' 'hook' 2> /dev/null)" +if [ $? -eq 0 ]; then + eval "$__conda_setup" +else + if [ -f "/opt/conda/etc/profile.d/conda.sh" ]; then + . "/opt/conda/etc/profile.d/conda.sh" + else + export PATH="/opt/conda/bin:$PATH" + fi +fi +unset __conda_setup + +if [ -f "/opt/conda/etc/profile.d/mamba.sh" ]; then + . "/opt/conda/etc/profile.d/mamba.sh" +fi +# <<< conda initialize <<<