I had a hard time to understand the "-v" flag. The help page of "docker run" shew that " -v" creates a bind mount. After I run my docker image using the above command, a folder named "io" was created. I guess the goal of the "-v" flag in this context is to copy the "prediction.csv" from the ":/output" folder to the local folder, "io". But I did not see the "prediction.csv" file in the "io" folder. Did I miss something? Or do I need to confirm anything?
Created by Xiaokang Wang XiaokangWang Good luck!
I am glad to hear you have had a good experience with this challenge and have learned a lot; I appreciate the feedback!
Thanks,
Robert
Hi Robert,
Thanks for your kind reply. I will check whether a "prediction.csv" was generated in the container first then check the step of copying the file to the local folder.
This community is so friendly. I have learned a lot in this challenge.
Best,
Xiaokang And here is the associated Dockerfile https://github.com/Sage-Bionetworks/IDG-DREAM-Drug-Kinase-Challenge/blob/master/round2/docker_demo/Dockerfile Hi there, yes, your understanding is correct.
When running your container, if your model writes predictions.csv into the "output" directory in the container, the file will be written to the local computer's "io" directory using this command. The goal of this command is also to copy input.csv into the "input" folder in the docker container.
My guess is that if you aren't getting a "predictions.csv" file in the local"io" folder, then your container is not writing the predictions.csv file to the "output" directory within the container, or that the path is not correct. You can see an example script that writes to the "output" directory, assuming the script is in a "model" directory (`COPY demo_prediction.R /model/demo_prediction.R` ) here: https://github.com/Sage-Bionetworks/IDG-DREAM-Drug-Kinase-Challenge/blob/master/round2/docker_demo/demo_prediction.R
Drop files to upload
what does the "-v" flag mean in "docker run -it --rm -v ${PWD}/io:/input -v ${PWD}/io:/output demo"? page is loading…