diff --git a/ci/Jenkinsfile_utils.groovy b/ci/Jenkinsfile_utils.groovy index a77ab1cde15c..85b55288f660 100644 --- a/ci/Jenkinsfile_utils.groovy +++ b/ci/Jenkinsfile_utils.groovy @@ -153,8 +153,7 @@ def docker_run(platform, function_name, use_nvidia = false, shared_mem = '500m', env_vars = [env_vars] } env_vars << "BRANCH=${env.BRANCH_NAME}" - env_vars = env_vars.collect { "-e ${it}" } - def env_vars_str = env_vars.join(' ') + def env_vars_str = "-e " + env_vars.join(' ') command = command.replaceAll('%ENV_VARS%', env_vars_str) command = command.replaceAll('%BUILD_ARGS%', build_args.length() > 0 ? "${build_args}" : '') command = command.replaceAll('%USE_NVIDIA%', use_nvidia ? '--nvidiadocker' : '') diff --git a/ci/build.py b/ci/build.py index f7e8a9e966b0..2c63c0d8d05f 100755 --- a/ci/build.py +++ b/ci/build.py @@ -120,6 +120,8 @@ def container_run(platform: str, 'CCACHE_LOGFILE': '/tmp/ccache.log', # a container-scoped log, useful for ccache verification. }) environment.update({k: os.environ[k] for k in ['CCACHE_MAXSIZE'] if k in os.environ}) + if 'RELEASE_BUILD' not in environment: + environment['RELEASE_BUILD'] = 'false' tag = get_docker_tag(platform=platform, registry=docker_registry) mx_root = get_mxnet_root() @@ -129,6 +131,9 @@ def container_run(platform: str, os.makedirs(local_ccache_dir, exist_ok=True) logging.info("Using ccache directory: %s", local_ccache_dir) + # Log enviroment + logging.info("environment ---> {0}".format(environment)) + # Build docker command docker_arg_list = [ "--cap-add", "SYS_PTRACE", # Required by ASAN @@ -144,9 +149,11 @@ def container_run(platform: str, # temp dir should be local and not shared '-e', 'CCACHE_TEMPDIR={}'.format(environment['CCACHE_TEMPDIR']), # this path is inside the container as /work/ccache is mounted - '-e', "CCACHE_DIR={}".format(environment['CCACHE_DIR']), + '-e', 'CCACHE_DIR={}'.format(environment['CCACHE_DIR']), # a container-scoped log, useful for ccache verification. - '-e', "CCACHE_LOGFILE={}".format(environment['CCACHE_LOGFILE']), + '-e', 'CCACHE_LOGFILE={}'.format(environment['CCACHE_LOGFILE']), + # whether this is a release build or not + '-e', 'RELEASE_BUILD={}'.format(environment['RELEASE_BUILD']), ] docker_arg_list += [tag] docker_arg_list.extend(command) diff --git a/tools/pip/setup.py b/tools/pip/setup.py index 246c8c4e3e0b..c0458a41cafe 100644 --- a/tools/pip/setup.py +++ b/tools/pip/setup.py @@ -45,7 +45,7 @@ __version__ = libinfo['__version__'] # set by the CD pipeline -is_release = os.environ.get("IS_RELEASE", "").strip() +is_release = os.environ.get("RELEASE_BUILD", "False").strip().lower() in ['true', '1'] # set by the travis build pipeline travis_tag = os.environ.get("TRAVIS_TAG", "").strip() @@ -58,7 +58,6 @@ elif travis_tag.startswith('patch-'): __version__ = os.environ['TRAVIS_TAG'].split('-')[1] - DEPENDENCIES = [ 'numpy<2.0.0,>1.16.0', 'requests>=2.20.0,<3',