MLCube: Support for GPUs and non-preprocessed NIfTI images#78
Conversation
|
|
||
| ENV nnUNet_raw_data_base="/tmp/nnUNet_raw_data_base" | ||
| ENV nnUNet_preprocessed="/tmp/nnUNet_preprocessed" | ||
| ENV CUDA_VISIBLE_DEVICES="0" |
There was a problem hiding this comment.
Something for us to ponder: how would this work for folks that have multiple GPUs and want to use one that is not "0"?
There was a problem hiding this comment.
@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
There was a problem hiding this comment.
Thanks, @aristizabal95!
I think this behavior is documented here: https://docs.docker.com/config/containers/resource_constraints/#gpu
There was a problem hiding this comment.
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.
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