Skip to content
Snippets Groups Projects
Commit 9cd40da8 authored by Christof Kaufmann's avatar Christof Kaufmann
Browse files

Workaround missing `mamba init --system` cmd

parent 5f568385
No related branches found
No related tags found
1 merge request!37Update code-server, install git-lfs
......@@ -149,6 +149,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 && \
......@@ -174,8 +176,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"
......
# >>> 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 <<<
......@@ -110,6 +110,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 && \
......@@ -135,8 +137,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"
......
# >>> 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 <<<
......@@ -110,6 +110,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 && \
......@@ -135,8 +137,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"
......
# >>> 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 <<<
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment