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/06/14 21:46:03 UTC
[GitHub] piiswrong closed pull request #11269: Enable shared ccache and fix
test
piiswrong closed pull request #11269: Enable shared ccache and fix test
URL: https://github.com/apache/incubator-mxnet/pull/11269
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/ci/build.py b/ci/build.py
index 35f8b478abf..b6821b328a1 100755
--- a/ci/build.py
+++ b/ci/build.py
@@ -40,7 +40,7 @@
from subprocess import call, check_call
from typing import *
-CCACHE_MAXSIZE = '10G'
+CCACHE_MAXSIZE = '500G'
def get_platforms(path: Optional[str] = "docker"):
"""Get a list of architectures given our dockerfiles"""
@@ -124,9 +124,12 @@ def buildir() -> str:
def default_ccache_dir() -> str:
# Share ccache across containers
if 'CCACHE_DIR' in os.environ:
- ccache_dir = os.path.realpath(os.environ['CCACHE_DIR'])
- os.makedirs(ccache_dir, exist_ok=True)
- return ccache_dir
+ try:
+ ccache_dir = os.path.realpath(os.environ['CCACHE_DIR'])
+ os.makedirs(ccache_dir, exist_ok=True)
+ return ccache_dir
+ except PermissionError:
+ logging.info('Unable to make dirs at %s, falling back to local temp dir', ccache_dir)
# In osx tmpdir is not mountable by default
if platform.system() == 'Darwin':
ccache_dir = "/tmp/_mxnet_ccache"
@@ -157,6 +160,7 @@ def container_run(platform: str,
'-v', "{}:/work/ccache".format(local_ccache_dir),
'-u', '{}:{}'.format(os.getuid(), os.getgid()),
'-e', 'CCACHE_MAXSIZE={}'.format(CCACHE_MAXSIZE),
+ '-e', 'CCACHE_TEMPDIR=/tmp/ccache', # temp dir should be local and not shared
'-e', "CCACHE_DIR=/work/ccache", # this path is inside the container as /work/ccache is mounted
tag]
runlist.extend(command)
diff --git a/ci/test_docker_cache.py b/ci/test_docker_cache.py
index fa8833fb002..3f471db5e7a 100644
--- a/ci/test_docker_cache.py
+++ b/ci/test_docker_cache.py
@@ -28,6 +28,7 @@
import logging
import subprocess
import sys
+from unittest.mock import MagicMock
sys.path.append(os.path.dirname(__file__))
import docker_cache
@@ -87,6 +88,8 @@ def setUp(self):
base = os.path.split(os.path.realpath(__file__))[0]
os.chdir(base)
+ docker_cache._login_dockerhub = MagicMock() # Override login
+
# Stop in case previous execution was dirty
try:
self._stop_local_docker_registry()
----------------------------------------------------------------
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