mirror of
https://github.com/wassname/ray.git
synced 2026-08-14 12:40:23 +08:00
Stop testing Python 2.7 and building Python 2.7 wheels. (#6601)
This commit is contained in:
committed by
Philipp Moritz
parent
8724e5ffd5
commit
96f2f8ff10
@@ -7,8 +7,7 @@
|
||||
# should be the latest commit on the branch "releases/<ray-version>".
|
||||
|
||||
# This script runs all of the application tests.
|
||||
# Currently includes an IMPALA stress test and a SGD stress test.
|
||||
# on both Python 2.7 and 3.6.
|
||||
# Currently includes an IMPALA stress test and a SGD stress test on Python 3.6.
|
||||
# All tests use a separate cluster, and each cluster
|
||||
# will be destroyed upon test completion (or failure).
|
||||
|
||||
|
||||
@@ -9,14 +9,7 @@ echo "PYTHON is $PYTHON"
|
||||
|
||||
cython_examples="$ROOT_DIR/../../doc/examples/cython"
|
||||
|
||||
if [[ "$PYTHON" == "2.7" ]]; then
|
||||
|
||||
pushd $cython_examples
|
||||
pip install --progress-bar=off scipy
|
||||
python setup.py install --user
|
||||
popd
|
||||
|
||||
elif [[ "$PYTHON" == "3.5" ]]; then
|
||||
if [[ "$PYTHON" == "3.5" ]]; then
|
||||
export PATH="$HOME/miniconda/bin:$PATH"
|
||||
|
||||
pushd $cython_examples
|
||||
|
||||
@@ -17,17 +17,7 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$PYTHON" == "2.7" ]] && [[ "$platform" == "linux" ]]; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential curl python-dev python-numpy python-pip unzip tmux gdb
|
||||
# Install miniconda.
|
||||
wget -q https://repo.continuum.io/miniconda/Miniconda2-4.5.4-Linux-x86_64.sh -O miniconda.sh -nv
|
||||
bash miniconda.sh -b -p $HOME/miniconda
|
||||
export PATH="$HOME/miniconda/bin:$PATH"
|
||||
pip install -q scipy tensorflow cython==0.29.0 gym opencv-python-headless pyyaml pandas==0.24.2 requests \
|
||||
feather-format lxml openpyxl xlrd py-spy setproctitle faulthandler pytest-timeout mock networkx \
|
||||
tabulate psutil kubernetes grpcio pytest-sugar pytest-rerunfailures
|
||||
elif [[ "$PYTHON" == "3.5" ]] && [[ "$platform" == "linux" ]]; then
|
||||
if [[ "$PYTHON" == "3.5" ]] && [[ "$platform" == "linux" ]]; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python-dev python-numpy build-essential curl unzip tmux gdb
|
||||
# Install miniconda.
|
||||
@@ -38,14 +28,6 @@ elif [[ "$PYTHON" == "3.5" ]] && [[ "$platform" == "linux" ]]; then
|
||||
feather-format lxml openpyxl xlrd py-spy setproctitle pytest-timeout networkx tabulate psutil aiohttp \
|
||||
uvicorn dataclasses pygments werkzeug kubernetes flask grpcio pytest-sugar pytest-rerunfailures pytest-asyncio \
|
||||
blist
|
||||
elif [[ "$PYTHON" == "2.7" ]] && [[ "$platform" == "macosx" ]]; then
|
||||
# Install miniconda.
|
||||
wget -q https://repo.continuum.io/miniconda/Miniconda2-4.5.4-MacOSX-x86_64.sh -O miniconda.sh -nv
|
||||
bash miniconda.sh -b -p $HOME/miniconda
|
||||
export PATH="$HOME/miniconda/bin:$PATH"
|
||||
pip install -q cython==0.29.0 tensorflow gym opencv-python-headless pyyaml pandas==0.24.2 requests \
|
||||
feather-format lxml openpyxl xlrd py-spy setproctitle faulthandler pytest-timeout mock networkx \
|
||||
tabulate psutil kubernetes grpcio pytest-sugar pytest-rerunfailures
|
||||
elif [[ "$PYTHON" == "3.5" ]] && [[ "$platform" == "macosx" ]]; then
|
||||
# Install miniconda.
|
||||
wget -q https://repo.continuum.io/miniconda/Miniconda3-4.5.4-MacOSX-x86_64.sh -O miniconda.sh -nv
|
||||
|
||||
@@ -16,13 +16,7 @@ if [[ "$TRAVIS" == "true" ]]; then
|
||||
echo "build --jobs=50" >> $HOME/.bazelrc
|
||||
fi
|
||||
|
||||
if [[ "$PYTHON" == "2.7" ]]; then
|
||||
|
||||
pushd "$ROOT_DIR/../../python"
|
||||
python setup.py install --user
|
||||
popd
|
||||
|
||||
elif [[ "$PYTHON" == "3.5" ]]; then
|
||||
if [[ "$PYTHON" == "3.5" ]]; then
|
||||
export PATH="$HOME/miniconda/bin:$PATH"
|
||||
|
||||
pushd "$ROOT_DIR/../../python"
|
||||
|
||||
@@ -25,25 +25,6 @@ TEST_SCRIPT="$TRAVIS_BUILD_DIR/python/ray/tests/test_microbenchmarks.py"
|
||||
UI_TEST_SCRIPT="$TRAVIS_BUILD_DIR/python/ray/tests/test_webui.py"
|
||||
|
||||
if [[ "$platform" == "linux" ]]; then
|
||||
# First test Python 2.7.
|
||||
|
||||
# Install miniconda.
|
||||
wget --quiet https://repo.continuum.io/miniconda/Miniconda2-4.5.4-Linux-x86_64.sh -O miniconda2.sh
|
||||
bash miniconda2.sh -b -p "$HOME/miniconda2"
|
||||
|
||||
PYTHON_EXE=$HOME/miniconda2/bin/python
|
||||
PIP_CMD=$HOME/miniconda2/bin/pip
|
||||
|
||||
# Find the right wheel by grepping for the Python version.
|
||||
PYTHON_WHEEL=$(find "$ROOT_DIR/../../.whl" -type f -maxdepth 1 -print | grep -m1 '27')
|
||||
|
||||
# Install the wheel.
|
||||
$PIP_CMD install -q "$PYTHON_WHEEL"
|
||||
|
||||
# Run a simple test script to make sure that the wheel works.
|
||||
INSTALLED_RAY_DIRECTORY=$(dirname "$($PYTHON_EXE -u -c "import ray; print(ray.__file__)" | tail -n1)")
|
||||
$PYTHON_EXE "$TEST_SCRIPT"
|
||||
|
||||
# Now test Python 3.6.
|
||||
|
||||
# Install miniconda.
|
||||
@@ -69,7 +50,7 @@ if [[ "$platform" == "linux" ]]; then
|
||||
|
||||
# Check that the other wheels are present.
|
||||
NUMBER_OF_WHEELS=$(ls -1q "$ROOT_DIR"/../../.whl/*.whl | wc -l)
|
||||
if [[ "$NUMBER_OF_WHEELS" != "4" ]]; then
|
||||
if [[ "$NUMBER_OF_WHEELS" != "3" ]]; then
|
||||
echo "Wrong number of wheels found."
|
||||
ls -l "$ROOT_DIR/../.whl/"
|
||||
exit 2
|
||||
@@ -77,13 +58,11 @@ if [[ "$platform" == "linux" ]]; then
|
||||
|
||||
elif [[ "$platform" == "macosx" ]]; then
|
||||
MACPYTHON_PY_PREFIX=/Library/Frameworks/Python.framework/Versions
|
||||
PY_MMS=("2.7"
|
||||
"3.5"
|
||||
PY_MMS=("3.5"
|
||||
"3.6"
|
||||
"3.7")
|
||||
# This array is just used to find the right wheel.
|
||||
PY_WHEEL_VERSIONS=("27"
|
||||
"35"
|
||||
PY_WHEEL_VERSIONS=("35"
|
||||
"36"
|
||||
"37")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user