Skip to content

Commit

Permalink
fix conda install blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
Dany Kaufman committed Feb 28, 2024
1 parent 6604df6 commit 3ff1024
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
15 changes: 7 additions & 8 deletions stable/jupyter/templates/jupyter-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ data:
{{ include "v3io-configs.script.lookupService" . | indent 4 }}

## Reset .bashrc on revision update
BASHRC_REV=1
BASHRC_REV=2
if ! $(grep -q IGZ_BASHRC_REV_${BASHRC_REV} ${HOME}/.bashrc 2>/dev/null); then
log 'Reset .bashrc on revision update'
echo "#IGZ_BASHRC_REV_${BASHRC_REV}" > ${HOME}/.bashrc
Expand Down Expand Up @@ -317,14 +317,13 @@ data:
}

function extended_conda(){
if [ "\${CONDA_DEFAULT_ENV-}" = "base" ] && [ "\$1" = "install" ]; then
echo "Error: Conda installations to the (base) environment are not persistent."
echo " Please activate a different conda environment or create a new one."
return 1
fi
if [[ \${CONDA_DEFAULT_ENV-} =~ jupyter|mlrun-base|mlrun-extended ]] && [ "\$1" = "install" ]; then
if [[ \${CONDA_DEFAULT_ENV-} = "base" || \${CONDA_DEFAULT_ENV-} = "jupyter" || \${CONDA_DEFAULT_ENV-} = "mlrun-base" || \${CONDA_DEFAULT_ENV-} = "mlrun-extended" ]] && [ "\$1" = "install" ]; then
echo "Error: Conda installations to the (\${CONDA_DEFAULT_ENV}) environment are not persistent."
echo " Please use PIP for persistent installations or create/activate another conda environment."
if [ "\${CONDA_DEFAULT_ENV-}" = "base" ]; then
echo " Please activate a different conda environment or create a new one."
else
echo " Please use PIP for persistent installations or create/activate another conda environment."
fi
return 1
fi
conda "\$@"
Expand Down
15 changes: 7 additions & 8 deletions stable/shell/templates/shell-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ data:
{{ include "v3io-configs.script.lookupService" . | indent 4 }}

## Reset .bashrc on revision update
BASHRC_REV=1
BASHRC_REV=2
if ! $(grep -q IGZ_BASHRC_REV_${BASHRC_REV} ${HOME}/.bashrc 2>/dev/null); then
log 'Reset .bashrc on revision update'
echo "#IGZ_BASHRC_REV_${BASHRC_REV}" > ${HOME}/.bashrc
Expand Down Expand Up @@ -300,14 +300,13 @@ data:
}

function extended_conda(){
if [ "\${CONDA_DEFAULT_ENV-}" = "base" ] && [ "\$1" = "install" ]; then
echo "Error: Conda installations to the (base) environment are not persistent."
echo " Please activate a different conda environment or create a new one."
return 1
fi
if [[ \${CONDA_DEFAULT_ENV-} =~ jupyter|mlrun-base|mlrun-extended ]] && [ "\$1" = "install" ]; then
if [[ \${CONDA_DEFAULT_ENV-} = "base" || \${CONDA_DEFAULT_ENV-} = "jupyter" || \${CONDA_DEFAULT_ENV-} = "mlrun-base" || \${CONDA_DEFAULT_ENV-} = "mlrun-extended" ]] && [ "\$1" = "install" ]; then
echo "Error: Conda installations to the (\${CONDA_DEFAULT_ENV}) environment are not persistent."
echo " Please use PIP for persistent installations or create/activate another conda environment."
if [ "\${CONDA_DEFAULT_ENV-}" = "base" ]; then
echo " Please activate a different conda environment or create a new one."
else
echo " Please use PIP for persistent installations or create/activate another conda environment."
fi
return 1
fi
conda "\$@"
Expand Down

0 comments on commit 3ff1024

Please sign in to comment.