You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/07/17 14:58:45 UTC

[GitHub] KellenSunderland commented on a change in pull request #11779: [MXNET-681] Add retry mechanism for the docker build stage

KellenSunderland commented on a change in pull request #11779: [MXNET-681] Add retry mechanism for the docker build stage
URL: https://github.com/apache/incubator-mxnet/pull/11779#discussion_r203056980
 
 

 ##########
 File path: ci/build.py
 ##########
 @@ -90,15 +90,33 @@ def build_docker(platform: str, docker_binary: str, registry: str) -> None:
     #
     # This doesn't work with multi head docker files.
     # 
-    cmd = [docker_binary, "build",
-           "-f", get_dockerfile(platform),
-           "--build-arg", "USER_ID={}".format(os.getuid()),
-           "--build-arg", "GROUP_ID={}".format(os.getgid()),
-           "--cache-from", tag,
-           "-t", tag,
-           "docker"]
-    logging.info("Running command: '%s'", ' '.join(cmd))
-    check_call(cmd)
+
+    num_retries = int(os.environ['DOCKER_BUILD_NUM_RETRIES']) if 'DOCKER_BUILD_NUM_RETRIES' in os.environ else 1
 
 Review comment:
   Would a --retry-actions argument for the script make sense here instead of an env var?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services