How to know mounted volume paths exactly?

How to know mounted volume paths exactly?  

  By: mtoan65 on Aug. 19, 2024, 10:27 a.m.

I've tried many paths like /test/input, /input or something like this and submitted many times but it didn't work. Can you provide me more details about the paths? I'll really appreciate.

Re: How to know mounted volume paths exactly?  

  By: YSang on Aug. 19, 2024, 3:13 p.m.

They are not set in the Dockerfile. The Dockerfile defines how to build the docker itself, but a docker volume is outside the container and is supposed to be mounted when running the container.

In inference.py you should set

INPUT_PATH = Path("/input")
OUTPUT_PATH = Path("/output")

https://github.com/YzzLiu/PENGWIN-example-algorithm/blob/main/PENGWIN-challenge-packages/preliminary-development-phase-ct/inference.py

And in test_run.sh, you should keep

INPUT_DIR="${SCRIPT_DIR}/test/input"
OUTPUT_DIR="${SCRIPT_DIR}/test/output"

and

    --volume "$INPUT_DIR":/input \
    --volume "$OUTPUT_DIR":/output \

to mount the volume, in order to run the container locally. And you should put your own test data in that folder.

After your container is submitted, the GC platform will mount new docker volumes to /input and /output, and your inference.py should be able to access through /input and /output normally. Neither you and I are supposed to know the exact local paths as they vary from case to case.

 Last edited by: YSang on Aug. 19, 2024, 3:16 p.m., edited 3 times in total.

Re: How to know mounted volume paths exactly?  

  By: tmdsurprises on Aug. 20, 2024, 11:40 a.m.

I have the same quetion, the error is Output directory 'images/pelvic-fracture-ct-segmentation' is empty, but it is too late to upload another docker image. What a pity!