Solved by Sid in post #8 
              
              
                Just an update, I thought I should mention the cause which might help others who view this tread on a later time. The time bazel server was exiting had nothing to do with the scripts that I was running. 
When I created the issue on my laptop which was running windows and docker for this purpose. Baz…