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

Fix mamba >= 2.0.0 initialization

parent d4dd9753
Branches
No related tags found
1 merge request!43Update code-server and fix mamba 2 init
......@@ -152,8 +152,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/"
# source /etc/profile.d/mamba-conda.sh to init mamba and conda (workaround for removed mamba init --system, see https://github.com/mamba-org/mamba/issues/3691)
COPY mamba-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 && \
......
# >>> mamba initialize >>>
# !! Contents within this block are managed by 'mamba shell init' !!
export MAMBA_EXE='/opt/conda/bin/mamba';
export MAMBA_ROOT_PREFIX='/opt/conda';
__mamba_setup="$("$MAMBA_EXE" shell hook --shell bash --root-prefix "$MAMBA_ROOT_PREFIX" 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__mamba_setup"
else
alias mamba="$MAMBA_EXE" # Fallback on help from mamba activate
fi
unset __mamba_setup
# <<< mamba initialize <<<
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/opt/conda/bin/conda' 'shell.posix' 'hook' 2> /dev/null)"
......@@ -11,8 +24,4 @@ else
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 <<<
......@@ -112,8 +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/"
# source /etc/profile.d/mamba-conda.sh to init mamba and conda (workaround for removed mamba init --system, see https://github.com/mamba-org/mamba/issues/3691)
COPY mamba-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 && \
......
# >>> mamba initialize >>>
# !! Contents within this block are managed by 'mamba shell init' !!
export MAMBA_EXE='/opt/conda/bin/mamba';
export MAMBA_ROOT_PREFIX='/opt/conda';
__mamba_setup="$("$MAMBA_EXE" shell hook --shell bash --root-prefix "$MAMBA_ROOT_PREFIX" 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__mamba_setup"
else
alias mamba="$MAMBA_EXE" # Fallback on help from mamba activate
fi
unset __mamba_setup
# <<< mamba initialize <<<
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/opt/conda/bin/conda' 'shell.posix' 'hook' 2> /dev/null)"
......@@ -11,8 +24,4 @@ else
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 <<<
......@@ -111,8 +111,8 @@ RUN mamba install --yes \
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/"
# source /etc/profile.d/mamba-conda.sh to init mamba and conda (workaround for removed mamba init --system, see https://github.com/mamba-org/mamba/issues/3691)
COPY mamba-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 && \
......
# >>> mamba initialize >>>
# !! Contents within this block are managed by 'mamba shell init' !!
export MAMBA_EXE='/opt/conda/bin/mamba';
export MAMBA_ROOT_PREFIX='/opt/conda';
__mamba_setup="$("$MAMBA_EXE" shell hook --shell bash --root-prefix "$MAMBA_ROOT_PREFIX" 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__mamba_setup"
else
alias mamba="$MAMBA_EXE" # Fallback on help from mamba activate
fi
unset __mamba_setup
# <<< mamba initialize <<<
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/opt/conda/bin/conda' 'shell.posix' 'hook' 2> /dev/null)"
......@@ -11,8 +24,4 @@ else
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