diff --git a/.circleci/docker/common/install_conda.sh b/.circleci/docker/common/install_conda.sh index b333051a89e..61672e86021 100755 --- a/.circleci/docker/common/install_conda.sh +++ b/.circleci/docker/common/install_conda.sh @@ -68,6 +68,10 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then as_jenkins conda install -q -y python="$ANACONDA_PYTHON_VERSION" $* } + pip_install() { + as_jenkins pip install --progress-bar off $* + } + # Install PyTorch conda deps, as per https://github.com/pytorch/pytorch README # DO NOT install cmake here as it would install a version newer than 3.10, but # we want to pin to version 3.10. @@ -94,22 +98,22 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then conda_install nnpack -c killeent # Install some other packages, including those needed for Python test reporting - as_jenkins pip install --progress-bar off -r /opt/conda/requirements-ci.txt + pip_install -r /opt/conda/requirements-ci.txt # Install numba only on python-3.8 or below # For numba issue see https://github.com/pytorch/pytorch/issues/51511 if [[ $(python -c "import sys; print(int(sys.version_info < (3, 9)))") == "1" ]]; then - as_jenkins pip install --progress-bar off numba==0.54.1 + pip_install numba==0.54.1 else - as_jenkins pip install --progress-bar off numba==0.49.0 + pip_install numba==0.49.0 fi # Update scikit-learn to a python-3.8 compatible version if [[ $(python -c "import sys; print(int(sys.version_info >= (3, 8)))") == "1" ]]; then - as_jenkins pip install --progress-bar off -U scikit-learn + pip_install -U scikit-learn else # Pinned scikit-learn due to https://github.com/scikit-learn/scikit-learn/issues/14485 (affects gcc 5.5 only) - as_jenkins pip install --progress-bar off scikit-learn==0.20.3 + pip_install scikit-learn==0.20.3 fi popd