mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[BE][CI] Add pip_install macro
Replaces repeated `as_jenkins pip install --progress-bar off` with call to `pip_install` macro Pull Request resolved: https://github.com/pytorch/pytorch/pull/77475 Approved by: https://github.com/kit1980, https://github.com/seemethere
This commit is contained in:
parent
69fa49f123
commit
1db1337473
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user