ray/ci/env/install-minimal.sh
Riatre 591cd22be7
Revert "Revert "Bump pytest from 5.4.3 to 7.0.1"" (#26525)
* Revert "Revert "Bump pytest from 5.4.3 to 7.0.1""

This reverts commit ab10890e90.

Signed-off-by: Riatre Foo <foo@riat.re>

* Fix missing test data files dependency in rllib/BUILD

See # 26334 and # 26517 for context.

Once this is in, it should be good to roll-forwrad again.

Signed-off-by: Riatre Foo <foo@riat.re>

* debug: run all tests

Signed-off-by: Riatre Foo <foo@riat.re>

* Revert "debug: run all tests"

This reverts commit 0c5e796b0eb437d64922f66749c61b0412486970.

Signed-off-by: Riatre Foo <foo@riat.re>

* fix new tests since last rebase

Signed-off-by: Riatre Foo <foo@riat.re>
2022-07-18 21:21:19 -07:00

43 lines
1.2 KiB
Bash
Executable file

#!/usr/bin/env bash
# Python version can be specified as 3.7, 3.8, 3.9, etc..
if [ -z "$1" ]; then
PYTHON_VERSION=${PYTHON-3.7}
else
if [ "$1" = "3.6" ]; then
PYTHON_VERSION=${PYTHON-3.6}
elif [ "$1" = "3.7" ]; then
PYTHON_VERSION=${PYTHON-3.7}
elif [ "$1" = "3.8" ]; then
PYTHON_VERSION=${PYTHON-3.8}
elif [ "$1" = "3.9" ]; then
PYTHON_VERSION=${PYTHON-3.9}
else
echo "Unsupported Python version."
exit 1
fi
fi
echo "Python version is ${PYTHON_VERSION}"
ROOT_DIR=$(cd "$(dirname "$0")/$(dirname "$(test -L "$0" && readlink "$0" || echo "/")")" || exit; pwd)
WORKSPACE_DIR="${ROOT_DIR}/../.."
# Installs conda and python 3.7
MINIMAL_INSTALL=1 PYTHON=${PYTHON_VERSION} "${WORKSPACE_DIR}/ci/env/install-dependencies.sh"
# Re-install Ray wheels
rm -rf "${WORKSPACE_DIR}/python/ray/thirdparty_files"
rm -rf "${WORKSPACE_DIR}/python/ray/pickle5_files"
eval "${WORKSPACE_DIR}/ci/ci.sh build"
# Install test requirements
python -m pip install -U \
pytest==7.0.1 \
numpy
# Train requirements.
# TODO: make this dynamic
if [ "${TRAIN_MINIMAL_INSTALL-}" = 1 ]; then
python -m pip install -U "ray[tune]"
fi