cerndb / dist-keras

Distributed Deep Learning, with a focus on distributed training, using Keras and Apache Spark.
http://joerihermans.com/work/distributed-keras/
GNU General Public License v3.0
623 stars 169 forks source link

Set hostname and port through environment variable #45

Open christaina opened 6 years ago

christaina commented 6 years ago

Hi,

This is a small change where master_host and master_port are read from optional environment variables (if they are not present behavior stays the same). In our use case we need to specify both the host and port because we are running dist-keras on Docker. I thought it would be useful for others who are using Docker or in the case where the Spark master is running in a container. For us using environment variables rather than passing these in as parameters makes more sense because we don't want everyone using this package in our system to have to worry about this. Hope this is helpful.