mirror of
https://github.com/hanzoai/open-instruct.git
synced 2026-10-30 18:26:32 +00:00
23 lines
718 B
Bash
Executable File
23 lines
718 B
Bash
Executable File
export CURRENT_DATETIME=$(python -c "import datetime; import pytz; print(datetime.datetime.now(pytz.timezone('America/Los_Angeles')).strftime('%m%d%y_%H%M%S'))")
|
|
export PYTHONPATH=$REPO_PATH
|
|
export PATH="/root/.local/bin:$PATH"
|
|
export NCCL_CUMEM_ENABLE=0
|
|
|
|
|
|
echo CURRENT_DATETIME=$CURRENT_DATETIME
|
|
echo PYTHONPATH=$PYTHONPATH
|
|
echo PATH=$PATH
|
|
|
|
# python3 -c "import os, ray; print(os.path.dirname(ray.__file__))"
|
|
|
|
RAY_NODE_PORT=8888
|
|
ray stop --force
|
|
|
|
if [ "$BEAKER_REPLICA_RANK" == "0" ]; then
|
|
echo "Starting Ray head node"
|
|
ray start --head --port=$RAY_NODE_PORT
|
|
else
|
|
echo "Starting Ray worker node $BEAKER_REPLICA_RANK"
|
|
ray start --address="${BEAKER_LEADER_REPLICA_HOSTNAME}:${RAY_NODE_PORT}" --block
|
|
fi
|