diff --git a/tensorflow/1.14-gpu/bootstrap.sh b/tensorflow/1.14-gpu/bootstrap.sh index 503e80b..00f7c06 100755 --- a/tensorflow/1.14-gpu/bootstrap.sh +++ b/tensorflow/1.14-gpu/bootstrap.sh @@ -17,5 +17,9 @@ fi # use eval because commands likes `key=value command` would cause file not found error when using $@, but this eval will ruin current environment eval $@ +code=$? + # persist output python /etc/save.py + +exit $code diff --git a/tensorflow/1.14-gpu/save.py b/tensorflow/1.14-gpu/save.py index 16ad890..4eeaf58 100644 --- a/tensorflow/1.14-gpu/save.py +++ b/tensorflow/1.14-gpu/save.py @@ -15,6 +15,6 @@ if __name__ == '__main__': client = Client(hdfs_address) client.upload(hdfs_dir, output_dir) - print('Save ' + output_dir + 'to' + hdfs_address + ' ' + hdfs_dir) + print('Save ' + output_dir + ' to' + hdfs_address + ' ' + hdfs_dir) except Exception as e: print('Unable to persist data to HDFS,', str(e)) diff --git a/tensorflow/2.1-gpu/bootstrap.sh b/tensorflow/2.1-gpu/bootstrap.sh index b7b7a88..5c3871a 100755 --- a/tensorflow/2.1-gpu/bootstrap.sh +++ b/tensorflow/2.1-gpu/bootstrap.sh @@ -17,5 +17,9 @@ fi # use eval because commands likes `key=value command` would cause file not found error when using $@, but this eval will ruin current environment eval $@ +code=$? + # Persist output python /etc/save.py + +exit $code diff --git a/tensorflow/2.1-gpu/save.py b/tensorflow/2.1-gpu/save.py index 16ad890..4eeaf58 100644 --- a/tensorflow/2.1-gpu/save.py +++ b/tensorflow/2.1-gpu/save.py @@ -15,6 +15,6 @@ if __name__ == '__main__': client = Client(hdfs_address) client.upload(hdfs_dir, output_dir) - print('Save ' + output_dir + 'to' + hdfs_address + ' ' + hdfs_dir) + print('Save ' + output_dir + ' to' + hdfs_address + ' ' + hdfs_dir) except Exception as e: print('Unable to persist data to HDFS,', str(e))