File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,11 +18,13 @@ if [ -f ./python_version ]; then
1818 DESIRED_PY_VERSION=${PY_VERSION_SAVED: 0: 3} # returns 3.6, 3.7 or 3.8
1919 CURRENT_PY_VERSION=$( python -c ' import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")' )
2020
21- if command -v conda > /dev/null 2>&1 ; then
22- echo " Installing python=$DESIRED_PY_VERSION with conda:"
23- conda install -y -n base pkgs/main::python=$DESIRED_PY_VERSION pip
21+ if [[ " $DESIRED_PY_VERSION " == " $CURRENT_PY_VERSION " ]]; then
22+ echo " Python Version in docker base image $CURRENT_PY_VERSION matches requirement python=$DESIRED_PY_VERSION . Skipping."
2423 else
25- if [[ " $DESIRED_PY_VERSION " != " $CURRENT_PY_VERSION " ]]; then
24+ if command -v conda > /dev/null 2>&1 ; then
25+ echo " Installing python=$DESIRED_PY_VERSION with conda:"
26+ conda install -y -n base pkgs/main::python=$DESIRED_PY_VERSION pip
27+ else
2628 echo " WARNING: Python Version $DESIRED_PY_VERSION is required, but $CURRENT_PY_VERSION was found."
2729 fi
2830 fi
You can’t perform that action at this time.
0 commit comments