Skip to content
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

Add RANO Data Preparation MLCube to examples #633

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions examples/RANO/data_preparator/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
*.csv
*.txt
*.nii.gz
*.zip
*.mat
*.dcm
*.png
*/mlcube/workspace/*
!requirements.txt
!*/mlcube/workspace/parameters.yaml
models
tmpmodel
35 changes: 35 additions & 0 deletions examples/RANO/data_preparator/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM local/fets_tool AS data_prep

RUN find /Front-End/bin/install/appdir/usr/bin -type f \( -perm -u=x -o -type l \) -exec cp -P {} /usr/bin \;

WORKDIR /

COPY ./project/requirements.txt /project/requirements.txt

RUN pip install --upgrade pip

RUN pip install -r /project/requirements.txt

ENV LANG C.UTF-8

RUN mkdir /project/stages

RUN cp /Front-End/bin/install/appdir/usr/bin/*.py /project/stages/

RUN cp -R /Front-End/bin/install/appdir/usr/bin/data_prep_models /project/stages/data_prep_models

# Hotfix: install more recent version of GaNDLF for metrics generation
RUN pip install git+https://github.com/mlcommons/GaNDLF@616b37bafad8f89d5c816a88f44fa30470601311

# setup a separate env for nnunet
RUN python -m venv /nnunet_env && /nnunet_env/bin/pip install --upgrade pip

RUN /nnunet_env/bin/pip install --default-timeout=1000 torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118

RUN /nnunet_env/bin/pip install git+https://github.com/MIC-DKFZ/nnUNet.git@nnunetv1

ENV CUDA_VISIBLE_DEVICES="0"

COPY ./project /project

ENTRYPOINT ["python", "/project/mlcube.py"]
10 changes: 10 additions & 0 deletions examples/RANO/data_preparator/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#! /bin/bash
mkdir tmp
cd tmp
git clone -b fets_2.0 https://github.com/FeTS-AI/Front-End.git
cd Front-End
git submodule update --init
docker build --target=fets_base -t local/fets_tool .
cd ../../
docker build --platform=linux/amd64 -t mlcommons/rano-data-prep-mlcube:1.0.10 .
rm -rf tmp
Loading
Loading