Skip to content

MLCube: Support for GPUs and non-preprocessed NIfTI images#78

Merged
sarthakpati merged 4 commits into
FeTS-AI:fets_2.0from
aristizabal95:separate-stages
Jan 16, 2024
Merged

MLCube: Support for GPUs and non-preprocessed NIfTI images#78
sarthakpati merged 4 commits into
FeTS-AI:fets_2.0from
aristizabal95:separate-stages

Conversation

@aristizabal95

@aristizabal95 aristizabal95 commented Jan 16, 2024

Copy link
Copy Markdown

This PR makes the necessary changes for the Data Preparation MLCube to support hardware acceleration and working with non-preprocessed NIfTI files.

Additionally, this PR implements changes to the statistics algorithm such that it returns the number of cases per split, instead of DICOM statistics

Comment thread Dockerfile

ENV nnUNet_raw_data_base="/tmp/nnUNet_raw_data_base"
ENV nnUNet_preprocessed="/tmp/nnUNet_preprocessed"
ENV CUDA_VISIBLE_DEVICES="0"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something for us to ponder: how would this work for folks that have multiple GPUs and want to use one that is not "0"?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hasan7n might be able to provide a better answer, but from my understanding, when running a Docker image passing the specific GPU(s) to use, Docker reassigns the ids from 0 to n. So for example passing
docker run ... --gpus "device=2", it will be identified within the Docker image with id=0.

@hasan7n let me know if I understood correctly. If you can also put a link to that info as a comment for this line in the docker image that would be great! I'll see if I can find it myself

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @aristizabal95!

I think this behavior is documented here: https://docs.docker.com/config/containers/resource_constraints/#gpu

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely true @aristizabal95 !

@sarthakpati that's of course however something to consider if we want to allow multiple-gpu execution. we can revisit this when it's needed.

@sarthakpati sarthakpati left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sarthakpati sarthakpati merged commit cb90aab into FeTS-AI:fets_2.0 Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants