Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Jupyter] [Shell] conda install block fix #1022

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stable/jupyter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.14.38
version: 0.14.39
apiVersion: v1
appVersion: 3.4.8
name: jupyter
Expand Down
15 changes: 7 additions & 8 deletions stable/jupyter/templates/jupyter-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,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 @@ -315,14 +315,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
2 changes: 1 addition & 1 deletion stable/shell/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.17.12
version: 0.17.13
apiVersion: v1
appVersion: ">=2.0.0"
description: Shell access to data services
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 @@ -41,7 +41,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 @@ -297,14 +297,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
Loading