Skip to content

Commit

Permalink
Fix build error
Browse files Browse the repository at this point in the history
Signed-off-by: Sachidanand Alle <[email protected]>
  • Loading branch information
SachidanandAlle committed Nov 8, 2024
1 parent 655754b commit 279bdbb
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ __pycache__
.vscode
.webpack
node_modules/
*.log

# Environments
.env
Expand Down
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ RUN BUILD_OHIF=false python setup.py bdist_wheel --build-number $(date +'%Y%m%d%
FROM ${FINAL_IMAGE}
LABEL maintainer="[email protected]"
WORKDIR /opt/monailabel
COPY requirements.txt /opt/monailabel/requirements.txt

RUN apt update -y && apt install -y git curl openslide-tools python3 python-is-python3 python3-pip
RUN python -m pip install --no-cache-dir pytest torch torchvision torchaudio

COPY --from=build /opt/monailabel/dist/monailabel* /opt/monailabel/dist/
RUN python -m pip install --no-cache-dir /opt/monailabel/dist/monailabel*.whl
RUN python -m pip install -v --no-cache-dir /opt/monailabel/dist/monailabel*.whl
RUN python -m pip uninstall sam2 -y
RUN python -m pip install -v --no-cache-dir -r /opt/monailabel/requirements.txt
6 changes: 3 additions & 3 deletions sample-apps/endoscopy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ def __init__(self, app_dir, studies, conf):
print(f" all, {', '.join(configs.keys())}")
print("---------------------------------------------------------------------------------------")
print("")
exit(-1)
# exit(-1)

models = models.split(",")
models = models.split(",") if models else []
models = [m.strip() for m in models]
invalid = [m for m in models if m != "all" and not configs.get(m)]
if invalid:
Expand All @@ -85,7 +85,7 @@ def __init__(self, app_dir, studies, conf):

logger.info(f"+++ Using Models: {list(self.models.keys())}")

self.sam = strtobool(conf.get("sam", "true"))
self.sam = strtobool(conf.get("sam2", "true"))
super().__init__(
app_dir=app_dir,
studies=studies,
Expand Down
2 changes: 1 addition & 1 deletion sample-apps/monaibundle/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, app_dir, studies, conf):
self.epistemic_simulation_size = int(conf.get("epistemic_simulation_size", "5"))
self.epistemic_dropout = float(conf.get("epistemic_dropout", "0.2"))

self.sam = strtobool(conf.get("sam", "true"))
self.sam = strtobool(conf.get("sam2", "true"))
super().__init__(
app_dir=app_dir,
studies=studies,
Expand Down
8 changes: 4 additions & 4 deletions sample-apps/pathology/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(self, app_dir, studies, conf):

configs = {k: v for k, v in sorted(configs.items())}

models = conf.get("models", "all")
models = conf.get("models")
if not models:
print("")
print("---------------------------------------------------------------------------------------")
Expand All @@ -63,9 +63,9 @@ def __init__(self, app_dir, studies, conf):
print(f" all, {', '.join(configs.keys())}")
print("---------------------------------------------------------------------------------------")
print("")
exit(-1)
# exit(-1)

models = models.split(",")
models = models.split(",") if models else []
models = [m.strip() for m in models]
invalid = [m for m in models if m != "all" and not configs.get(m)]
if invalid:
Expand All @@ -90,7 +90,7 @@ def __init__(self, app_dir, studies, conf):

logger.info(f"+++ Using Models: {list(self.models.keys())}")

self.sam = strtobool(conf.get("sam", "true"))
self.sam = strtobool(conf.get("sam2", "true"))
super().__init__(
app_dir=app_dir,
studies=studies,
Expand Down
4 changes: 2 additions & 2 deletions sample-apps/radiology/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(self, app_dir, studies, conf):
print("")
exit(-1)

models = models.split(",")
models = models.split(",") if models else []
models = [m.strip() for m in models]
# Can be configured with --conf scribbles false or true
self.scribbles = conf.get("scribbles", "true") == "true"
Expand Down Expand Up @@ -100,7 +100,7 @@ def __init__(self, app_dir, studies, conf):
# Load models from bundle config files, local or released in Model-Zoo, e.g., --conf bundles <spleen_ct_segmentation>
self.bundles = get_bundle_models(app_dir, conf, conf_key="bundles") if conf.get("bundles") else None

self.sam = strtobool(conf.get("sam", "true"))
self.sam = strtobool(conf.get("sam2", "true"))
super().__init__(
app_dir=app_dir,
studies=studies,
Expand Down

0 comments on commit 279bdbb

Please sign in to comment.