Skip to content

Commit 8484dbd

Browse files
committed
hack for testing in dev version
Signed-off-by: Mingxin Zheng <[email protected]>
1 parent 16eb089 commit 8484dbd

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

ci/get_bundle_requirements.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@
1212

1313
import argparse
1414
import os
15+
import re
1516

1617
from bundle_custom_data import install_dependency_dict
1718
from utils import get_json_dict
1819

20+
def is_commit_hash(s):
21+
return bool(re.match('^[0-9a-f]{7,40}$', s))
1922

2023
def get_requirements(bundle, models_path):
2124
"""
@@ -29,7 +32,10 @@ def get_requirements(bundle, models_path):
2932
libs = []
3033
if "monai_version" in metadata.keys():
3134
monai_version = metadata["monai_version"]
32-
libs.append(f"monai=={monai_version}")
35+
if is_commit_hash(monai_version):
36+
libs.append(f"git+https://github.com/Project-MONAI/MONAI@${monai_version}#egg=monai")
37+
else:
38+
libs.append(f"monai=={monai_version}")
3339
if "pytorch_version" in metadata.keys():
3440
pytorch_version = metadata["pytorch_version"]
3541
libs.append(f"torch=={pytorch_version}")

models/spleen_deepedit_annotation/configs/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"0.1.0": "complete the model package",
2929
"0.0.1": "initialize the model package structure"
3030
},
31-
"monai_version": "1.2.0",
31+
"monai_version": "fc1350aae1de702404189f334ac17fd6f51321d0",
3232
"pytorch_version": "1.13.1",
3333
"numpy_version": "1.22.2",
3434
"optional_packages_version": {

0 commit comments

Comments
 (0)