#!/bin/bash # wut-tf # # Starts worker client. # # Usage: # wut-tf # Example: # wut-tf # # Note: # Each node needs a unique index number. # # NOTE! # This generates the node number based off the hostname. # The hosts are ml0 through ml5. HOSTNUM=`hostname | sed -e 's/ml//g'` #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"}}' export TF_CONFIG='{"cluster": {"worker": [ "ml1-int:2222", "ml2-int:2222", "ml3-int:2222", "ml4-int:2222", "ml5-int:2222"]}}' echo $TF_CONFIG python3 wut-tf.py