mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 03:18:59 +08:00
21 lines
746 B
Bash
21 lines
746 B
Bash
# NO shebang! Force the user to run this using the 'source' command without spawning a new shell; otherwise, variable exports won't persist.
|
|
|
|
echo "Adding Ray to PYTHONPATH" 1>&2
|
|
|
|
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
|
|
|
|
export GRPC_VERBOSITY=ERROR # make grpc only print error messages
|
|
export PYTHONPATH="$ROOT_DIR/lib/python/:$ROOT_DIR/thirdparty/numbuf/build"
|
|
|
|
# Print instructions for adding Ray to your bashrc.
|
|
unamestr="$(uname)"
|
|
if [[ "$unamestr" == "Linux" ]]; then
|
|
BASH_RC="~/.bashrc"
|
|
elif [[ "$unamestr" == "Darwin" ]]; then
|
|
BASH_RC="~/.bash_profile"
|
|
fi
|
|
echo "To permanently add Ray to your Python path, run,
|
|
|
|
echo 'export PYTHONPATH=$ROOT_DIR/lib/python/:$ROOT_DIR/thirdparty/numbuf/build:\$PYTHONPATH' >> $BASH_RC
|
|
"
|