diff --git a/script/build-dockerfile/customize.py b/script/build-dockerfile/customize.py index e8b759e377..3285224d47 100644 --- a/script/build-dockerfile/customize.py +++ b/script/build-dockerfile/customize.py @@ -52,11 +52,16 @@ def preprocess(i): if not docker_image_base: return {'return': 1, 'error': f"Version \"{env['CM_DOCKER_OS_VERSION']}\" is not supported yet for \"{env['CM_DOCKER_OS']}\" "} - if "CM_MLOPS_REPO" in env: + if env.get("CM_MLOPS_REPO", "") != "": cm_mlops_repo = env["CM_MLOPS_REPO"] else: cm_mlops_repo = "mlcommons@ck" + if env.get("CM_MLOPS_REPO_BRANCH", '') != '': + cm_mlops_repo_branch_string = f" --branch {env['CM_MLOPS_REPO_BRANCH']}" + else: + cm_mlops_repo_branch_string = "" + if 'CM_DOCKERFILE_WITH_PATH' not in env: env['CM_DOCKERFILE_WITH_PATH'] = os.path.join(os.getcwd(), "Dockerfile") diff --git a/script/build-mlperf-inference-server-nvidia/_cm.yaml b/script/build-mlperf-inference-server-nvidia/_cm.yaml index 6dd5ebe8e3..da0d53f9be 100644 --- a/script/build-mlperf-inference-server-nvidia/_cm.yaml +++ b/script/build-mlperf-inference-server-nvidia/_cm.yaml @@ -219,6 +219,7 @@ docker: shm_size: '32gb' extra_run_args: ' --runtime=nvidia --ulimit memlock=-1 --cap-add SYS_ADMIN --cap-add SYS_TIME --security-opt apparmor=unconfined --security-opt seccomp=unconfined' docker_os: ubuntu + cm_repo_flags: ' --branch=mlperf-inference' docker_real_run: False interactive: True docker_os_version: '20.04' diff --git a/script/install-pytorch-from-src/_cm.json b/script/install-pytorch-from-src/_cm.json index 75f15a5018..dcd6133a17 100644 --- a/script/install-pytorch-from-src/_cm.json +++ b/script/install-pytorch-from-src/_cm.json @@ -93,7 +93,7 @@ "CM_GIT_CHECKOUT_TAG": "#" }, "ad": { - "pytorch-src-repo": { + "pytorch-src-repo": { "tags": "_no-recurse-submodules,_full-history" } } @@ -230,7 +230,12 @@ "tags": "get,cmake", "version_min": "3.25.0" } - ] + ], + "ad": { + "pytorch-src-repo": { + "tags": "_recurse-submodules,_full-history" + } + } }, "cuda": { "deps": [ diff --git a/script/install-pytorch-from-src/run.sh b/script/install-pytorch-from-src/run.sh index 3d76b8efd1..ea54bca14c 100644 --- a/script/install-pytorch-from-src/run.sh +++ b/script/install-pytorch-from-src/run.sh @@ -6,7 +6,7 @@ if [[ ! -e pytorch/dist/torch*.whl ]]; then cp -r ${CM_PYTORCH_SRC_REPO_PATH} pytorch cd pytorch git submodule sync - git submodule update --init --recursive + #git submodule update --init --recursive rm -rf build ${CM_PYTHON_BIN_WITH_PATH} -m pip install -r requirements.txt