satnogs-wut/wut-worker

27 lines
612 B
Plaintext
Raw Normal View History

2020-01-17 18:05:28 -07:00
#!/bin/bash
# wut-worker
#
# Starts worker client.
#
# Usage:
# wut-worker
# Example:
# wut-worker
2020-01-17 18:13:40 -07:00
#
# 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-18 15:02:34 -07:00
#let HOSTNUM=$HOSTNUM-1
2020-01-17 18:13:40 -07:00
2020-01-18 15:02:34 -07:00
export TF_CONFIG='{"cluster": {"worker": [ "10.100.100.130:2222", "ml1:2222", "ml2:2222", "ml3:2222", "ml4:2222", "ml5:2222"]}, "task": {"index": '$HOSTNUM', "type": "worker"}}'
2020-01-17 18:13:40 -07:00
echo $TF_CONFIG
2020-01-17 18:22:13 -07:00
python3 wut-worker.py
2020-01-17 18:13:40 -07:00