satnogs-wut/wut-worker-train-cluster-fn

26 lines
662 B
Plaintext
Raw Normal View History

2020-01-18 15:45:37 -07:00
#!/bin/bash
# wut-worker-train-cluster-fn
#
# Starts worker client.
#
# Usage:
# wut-worker-train-cluster-fn
# Example:
# wut-worker-train-cluster-fn
#
# Note:
# Each node needs a unique index number.
#
# NOTE!
# This generates the node number based off the hostname.
# The hosts are ml1 through ml5. The index starts at zero,
# so the index is hostname minus one (without alpha).
HOSTNUM=`hostname | sed -e 's/ml//g'`
2020-01-20 19:03:02 -07:00
export TF_CONFIG='{"cluster": {"worker": [ "ml0-int:2222", "ml1-int:2222", "ml2-int:2222", "ml3-int:2222", "ml4-int:2222", "ml5-int:2222"]}, "task": {"index": '$HOSTNUM', "type": "worker"}}'
2020-01-18 15:45:37 -07:00
echo $TF_CONFIG
2020-01-18 15:49:07 -07:00
python3 wut-train-cluster-fn.py
2020-01-18 15:45:37 -07:00