mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 19:48:31 +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
@@ -4,16 +4,9 @@ dist: xenial
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
env: BAZEL_PYTHON_VERSION=PY2 PYTHON=2.7 PYTHONWARNINGS=ignore
|
||||
|
||||
- os: linux
|
||||
env: BAZEL_PYTHON_VERSION=PY3 PYTHON=3.5 PYTHONWARNINGS=ignore
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode7
|
||||
env: BAZEL_PYTHON_VERSION=PY2 PYTHON=2.7 PYTHONWARNINGS=ignore
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode7
|
||||
env: BAZEL_PYTHON_VERSION=PY3 PYTHON=3.5 PYTHONWARNINGS=ignore
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Installing Ray
|
||||
==============
|
||||
|
||||
Ray supports Python 2 and Python 3 as well as MacOS and Linux. Windows support
|
||||
Ray currently supports MacOS and Linux. Windows support
|
||||
is planned for the future.
|
||||
|
||||
Latest stable version
|
||||
@@ -30,18 +30,15 @@ master branch). To install these wheels, run the following command:
|
||||
`Linux Python 3.7`_ `MacOS Python 3.7`_
|
||||
`Linux Python 3.6`_ `MacOS Python 3.6`_
|
||||
`Linux Python 3.5`_ `MacOS Python 3.5`_
|
||||
`Linux Python 2.7`_ `MacOS Python 2.7`_
|
||||
=================== ===================
|
||||
|
||||
|
||||
.. _`Linux Python 3.7`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.9.0.dev0-cp37-cp37m-manylinux1_x86_64.whl
|
||||
.. _`Linux Python 3.6`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.9.0.dev0-cp36-cp36m-manylinux1_x86_64.whl
|
||||
.. _`Linux Python 3.5`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.9.0.dev0-cp35-cp35m-manylinux1_x86_64.whl
|
||||
.. _`Linux Python 2.7`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.9.0.dev0-cp27-cp27mu-manylinux1_x86_64.whl
|
||||
.. _`MacOS Python 3.7`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.9.0.dev0-cp37-cp37m-macosx_10_6_intel.whl
|
||||
.. _`MacOS Python 3.6`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.9.0.dev0-cp36-cp36m-macosx_10_6_intel.whl
|
||||
.. _`MacOS Python 3.5`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.9.0.dev0-cp35-cp35m-macosx_10_6_intel.whl
|
||||
.. _`MacOS Python 2.7`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.9.0.dev0-cp27-cp27m-macosx_10_6_intel.whl
|
||||
|
||||
Installing Ray with Anaconda
|
||||
----------------------------
|
||||
|
||||
@@ -13,23 +13,19 @@ MACPYTHON_URL=https://www.python.org/ftp/python
|
||||
MACPYTHON_PY_PREFIX=/Library/Frameworks/Python.framework/Versions
|
||||
DOWNLOAD_DIR=python_downloads
|
||||
|
||||
PY_VERSIONS=("2.7.13"
|
||||
"3.5.3"
|
||||
PY_VERSIONS=("3.5.3"
|
||||
"3.6.1"
|
||||
"3.7.0")
|
||||
PY_INSTS=("python-2.7.13-macosx10.6.pkg"
|
||||
"python-3.5.3-macosx10.6.pkg"
|
||||
PY_INSTS=("python-3.5.3-macosx10.6.pkg"
|
||||
"python-3.6.1-macosx10.6.pkg"
|
||||
"python-3.7.0-macosx10.6.pkg")
|
||||
PY_MMS=("2.7"
|
||||
"3.5"
|
||||
PY_MMS=("3.5"
|
||||
"3.6"
|
||||
"3.7")
|
||||
|
||||
# The minimum supported numpy version is 1.14, see
|
||||
# https://issues.apache.org/jira/browse/ARROW-3141
|
||||
NUMPY_VERSIONS=("1.14.5"
|
||||
"1.14.5"
|
||||
"1.14.5"
|
||||
"1.14.5")
|
||||
|
||||
|
||||
@@ -11,15 +11,13 @@ echo 10
|
||||
EOF
|
||||
chmod +x /usr/bin/nproc
|
||||
|
||||
PYTHONS=("cp27-cp27mu"
|
||||
"cp35-cp35m"
|
||||
PYTHONS=("cp35-cp35m"
|
||||
"cp36-cp36m"
|
||||
"cp37-cp37m")
|
||||
|
||||
# The minimum supported numpy version is 1.14, see
|
||||
# https://issues.apache.org/jira/browse/ARROW-3141
|
||||
NUMPY_VERSIONS=("1.14.5"
|
||||
"1.14.5"
|
||||
"1.14.5"
|
||||
"1.14.5")
|
||||
|
||||
@@ -29,12 +27,6 @@ sudo apt-get install unzip
|
||||
# Put bazel into the PATH
|
||||
export PATH=$PATH:/root/bin
|
||||
|
||||
# Remove this old Python 2.4.3 executable, and make the "python2" command find
|
||||
# a newer version of Python. We need this for autogenerating some files for the
|
||||
# UI.
|
||||
rm -f /usr/bin/python2
|
||||
ln -s /opt/python/cp27-cp27m/bin/python2 /usr/bin/python2
|
||||
|
||||
# Install and use the latest version of Node.js in order to build the dashboard.
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
|
||||
source $HOME/.nvm/nvm.sh
|
||||
|
||||
Reference in New Issue
Block a user