Hello, I am testing my MLCube with the test code provided by BraTS. My code works on my local data, but fails when tested because I cannot make a writeable directory within the MLCube for intermediate calculations. Could someone provide guidance on how to make a directory where I can write to within the MLCube for intermediate calculations? Specifically for the testing code provided by brats.

Created by Juampablo Heras Rivera juampablo
Hi @aristizabal95, thank you for the response, this is very helpful! I have another question: When I run the MLCube BraTS test code i get the following error: ``` FileExistsError: [Errno 17] File exists: '/Users/path/to/test_mlcubes2/eval_segmentation' -> '/Users/username/.medperf/cubes/api_medperf_org/b86afd4d2164c87e11400af5169785456bcede6c4d82a816b3af5353ebfec365' ``` Any ideas what could be causing this? I tried redownloading test_mlcubes and deleting the filename after the '->' but still have this issue. Thank you, Juampablo
Hi @juampablo, I'm from the Medperf development team. MLCubes, being based on Docker images, are usually built using root, which means that all folders within the container are owned by root. Medperf executes an MLCube passing the current user UID, so that execution and generated assets are created under the current user instead of root, which otherwise would cause issues accessing and working with the generated artifacts like predictions. Because of this, trying to create folders outside the mounted volumes will cause "permission denied" errors, as you're trying to write to a folder owned by root. We cannot avoid the permission denied error, but in cases where intermediary files need to be created our common practice is to write them to a temporary folder in the output parameter or volume. In the case for model MLCubes, that would be writing to the predictions folder. You can then safely delete that temporary folder once processing is done or an error is encountered. Hope this helps.

another MLCube question--making writeable directories page is loading…