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

Install python dependencies with a single pip install #5082

Merged
merged 5 commits into from Jan 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 9 additions & 4 deletions dev/install-common-deps.sh
Expand Up @@ -27,18 +27,19 @@ else
fi
export MLFLOW_HOME=$(pwd)

req_files=""
# Install Python test dependencies only if we're running Python tests
if [[ "$INSTALL_SMALL_PYTHON_DEPS" == "true" ]]; then
# When downloading large packages from PyPI, the connection is sometimes aborted by the
# remote host. See https://github.com/pypa/pip/issues/8510.
# As a workaround, we retry installation of large packages.
retry-with-backoff pip install -r requirements/small-requirements.txt
req_files+=" -r requirements/small-requirements.txt"
fi
if [[ "$INSTALL_SKINNY_PYTHON_DEPS" == "true" ]]; then
retry-with-backoff pip install -r requirements/skinny-requirements.txt
req_files+=" -r requirements/skinny-requirements.txt"
fi
if [[ "$INSTALL_LARGE_PYTHON_DEPS" == "true" ]]; then
retry-with-backoff pip install -r requirements/large-requirements.txt
req_files+=" -r requirements/large-requirements.txt"

# Install prophet's dependencies beforehand, otherwise pip would fail to build a wheel for prophet
if [[ -z "$(pip cache list prophet --format abspath)" ]]; then
Expand All @@ -49,7 +50,11 @@ if [[ "$INSTALL_LARGE_PYTHON_DEPS" == "true" ]]; then
rm -rf $tmp_dir
fi

retry-with-backoff pip install -r requirements/extra-ml-requirements.txt
req_files+=" -r requirements/extra-ml-requirements.txt"
fi

if [[ ! -z $req_files ]]; then
retry-with-backoff pip install $req_files
fi

# Install `mlflow-test-plugin` without dependencies
Expand Down