Found a possible bug and resolution (Unsure if the resolution is a best practice) - Reporting it for the community and developers
The problem is with the below chunk in path-to-library/cloudml/cloudml/cloudml/deploy.py
# Stream output from subprocess to console.
for line in iter(process.stdout.readline, ""):
sys.stdout.write(line.decode('utf-8'))
Once the execution is completed, this does not does not halt and hence enters a continuous loop.
Resolution : comment out the above chunk from deploy.py and it will give you a successful execution.
Downside : you won't be able to see step-by-step installation progress and hence won't get a hint from logs if there is an error in the script. But below chunk will ensure the check on successful execution. If there is an error in the script, it will keep on running endlessly.
# Finalize the process.
stdout, stderr = process.communicate()
# Detect a non-zero exit code.
if process.returncode != 0:
fmt = "Command %s failed: exit code %s"
print(fmt % (commands, process.returncode))
else:
print("Command %s ran successfully." % (commands, ))