mirror of
https://github.com/vale981/ray
synced 2025-03-06 18:41:40 -05:00
48 lines
1.1 KiB
Bash
Executable file
48 lines
1.1 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# Cause the script to exit if a single command fails.
|
|
set -e
|
|
|
|
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
|
|
|
|
echo "PYTHON is $PYTHON"
|
|
|
|
# If we are in Travis, most of the compilation result will be cached.
|
|
# This means we are I/O bounded. By default, Bazel set the number of concurrent
|
|
# jobs to the the number cores on the machine, which are not efficient for
|
|
# network bounded cache downloading workload. Therefore we increase the number
|
|
# of jobs to 50
|
|
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
|
|
export PATH="$HOME/miniconda/bin:$PATH"
|
|
|
|
pushd "$ROOT_DIR/../../python"
|
|
pushd ray/dashboard/client
|
|
source $HOME/.nvm/nvm.sh
|
|
nvm use node
|
|
npm ci
|
|
npm run build
|
|
popd
|
|
python setup.py install --user
|
|
popd
|
|
|
|
elif [[ "$LINT" == "1" ]]; then
|
|
export PATH="$HOME/miniconda/bin:$PATH"
|
|
|
|
pushd "$ROOT_DIR/../../python"
|
|
python setup.py install --user
|
|
popd
|
|
else
|
|
echo "Unrecognized Python version."
|
|
exit 1
|
|
fi
|
|
|