-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates aide-svrtk MAP with MONAI-based CNN #13
base: main
Are you sure you want to change the base?
Changes from 5 commits
65e02cb
4b90fb9
5572cf4
628a93c
1c8d3f7
691d563
f44dc9d
451c02e
c76b8e6
7440546
2c6f200
cd69bfe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ WORKDIR /var/monai | |
|
||
# Add SVRTK to MAP | ||
|
||
WORKDIR /home | ||
WORKDIR /bin | ||
|
||
# Install general libraries | ||
RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \ | ||
|
@@ -37,40 +37,40 @@ RUN apt-get install -y \ | |
|
||
# Install MIRTK/SVRTK | ||
RUN git clone https://github.com/SVRTK/MIRTK.git \ | ||
&& mkdir -p /home/MIRTK/Packages/SVRTK | ||
RUN git clone https://github.com/SVRTK/SVRTK.git /home/MIRTK/Packages/SVRTK \ | ||
&& mkdir -p /home/MIRTK/build \ | ||
&& cd /home/MIRTK/build \ | ||
&& mkdir -p /bin/MIRTK/Packages/SVRTK | ||
RUN git clone https://github.com/SVRTK/SVRTK.git /bin/MIRTK/Packages/SVRTK \ | ||
&& mkdir -p /bin/MIRTK/build \ | ||
&& cd /bin/MIRTK/build \ | ||
&& cmake -D WITH_TBB="ON" -D MODULE_SVRTK="ON" .. \ | ||
&& make -j | ||
|
||
ENV PATH="$PATH:/home/MIRTK/build/bin:/home/MIRTK/build/lib/tools" | ||
ENV PATH="$PATH:/bin/MIRTK/build/bin:/bin/MIRTK/build/lib/tools" | ||
|
||
WORKDIR /var/monai | ||
|
||
|
||
# Add 3D UNet model weights & execution script | ||
# Add MONAI 3D UNet model weights & execution script | ||
|
||
WORKDIR /home | ||
|
||
# Setup 3D UNet models | ||
RUN git clone https://github.com/SVRTK/Segmentation_FetalMRI.git --branch svrtk-docker-gpu-0.10 --single-branch /home/Segmentation_FetalMRI | ||
RUN git clone https://github.com/SVRTK/auto-proc-svrtk.git /home/auto-proc-svrtk | ||
|
||
RUN wget https://gin.g-node.org/SVRTK/fetal_mri_network_weights/raw/master/checkpoints-brain-loc-2-labels/latest.ckpt -P /home/Segmentation_FetalMRI/trained-models/checkpoints-brain-loc-labels \ | ||
&& wget https://gin.g-node.org/SVRTK/fetal_mri_network_weights/raw/master/checkpoints-brain-loc-2-labels-cropped/latest.ckpt -P /home/Segmentation_FetalMRI/trained-models/checkpoints-brain-loc-labels-cropped \ | ||
&& wget https://gin.g-node.org/SVRTK/fetal_mri_network_weights/raw/master/checkpoints-brain-reo-5-labels/latest.ckpt -P /home/Segmentation_FetalMRI/trained-models/checkpoints-brain-reorientation \ | ||
&& wget https://gin.g-node.org/SVRTK/fetal_mri_network_weights/raw/master/checkpoints-brain-reo-5-labels-raw-stacks/latest.ckpt -P /home/Segmentation_FetalMRI/trained-models/checkpoints-brain-reorientation-stacks | ||
RUN wget https://gin.g-node.org/SVRTK/fetal_mri_network_weights/raw/master/monai-checkpoints-atunet-brain_bet_all_degree_raw_stacks-1-lab/best_metric_model.pth -P /home/auto-proc-svrtk/trained-models/monai-checkpoints-atunet-brain_bet_all_degree_raw_stacks-1-lab \ | ||
&& wget https://gin.g-node.org/SVRTK/fetal_mri_network_weights/raw/master/monai-checkpoints-unet-global-loc-2-lab/best_metric_model.pth -P /home/auto-proc-svrtk/trained-models/monai-checkpoints-unet-global-loc-2-lab \ | ||
&& wget https://gin.g-node.org/SVRTK/fetal_mri_network_weights/raw/master/monai-checkpoints-unet-svr-brain-reo-5-lab/best_metric_model.pth -P /home/auto-proc-svrtk/trained-models/monai-checkpoints-unet-svr-brain-reo-5-lab \ | ||
&& wget https://gin.g-node.org/SVRTK/fetal_mri_network_weights/raw/master/monai-checkpoints-unet-svr-brain-reo-raw-stacks-5-lab/best_metric_model.pth -P /home/auto-proc-svrtk/trained-models/monai-checkpoints-unet-svr-brain-reo-raw-stacks-5-lab | ||
|
||
# Install Python packages | ||
RUN python -m pip install -r /home/Segmentation_FetalMRI/requirements.txt | ||
RUN python -m pip install -r /home/auto-proc-svrtk/config/requirements.txt | ||
|
||
# Bugfix: without below, cannot import torch within Python | ||
# Error: OSError: /opt/hpcx/ompi/lib/libmpi.so.40: undefined symbol: opal_hwloc201_hwloc_get_type_depth | ||
# Fix: https://forums.developer.nvidia.com/t/issues-building-docker-image-from-ngc-container-nvcr-io-nvidia-pytorch-22-py3/209034/5 | ||
ENV PATH="${PATH}:/opt/hpcx/ompi/bin" | ||
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/hpcx/ompi/lib" | ||
|
||
COPY docker-recon-brain-auto.bash /home/scripts/docker-recon-brain-auto.bash | ||
COPY /home/auto-proc-svrtk/scripts/auto-brain-reconstruction-aide.sh /home/scripts/auto-brain-reconstruction.sh | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can remove this line entirely. The Instead, you clone the One thing I noticed – you have two scripts in here, one of which is labelled "aide". Make sure you are pointing at the correct script. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated thank you |
||
RUN mkdir -p /home/recon \ | ||
&& mkdir -p /home/output \ | ||
&& chmod +x /home/scripts/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The most important thing here is the I think you can remove the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated thank you |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the errors are to do with this line currently. You've changed the location of the recon Shell script, but not updated the rest of the Dockerfile and Python code to reflect the new script location, so... see other comments where I can see you need to make changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i fixed paths and was able to run monai-deploy run ghcr.io/svrtk/aide-svrtk/map:0.2.1 input/ output/