Hi everyone,
I'm finding the instructions for creating the Docker submission a little vague. Specifically, I'm not sure how inputs and outputs are specified / should be handled by our Docker container.
The Wiki says to accept "\--input" as a parameter, but also that the files will be mounted to /input/ in the container. When submitting my container I get an error saying that the parameter "--input_file" is not defined.
This leaves me a little confused to what exactly we're supposed to do here.
Has anyone gotten their Docker container to a valid submission state and can clear up my confusion?
Thanks in advance!
Created by Johannes Roth johannesroth Hi @vchung ,
Just to make sure, because i didn't participate in segmentation challenge last year.
is --input-dir will contain:
```
id_t1.nii.gz
id_t1ce.nii.gz
id_t2.nii.gz
id_flair.nii.gz
```
or will contain:
```
id /
id_t1.nii.gz
id_t1ce.nii.gz
id_t2.nii.gz
id_flair.nii.gz
```
Thank you.
Hi @agussa ,
Great question. Similar to last year, your submitted model is expected to predict for one case only -- we will handle mounting the list of case folders for you. Hi @vchung ,
is "--input-dir" a folder that contains all the .nii.gz files? so we have to process one by one with loop?
thanks. Hi @giemmecci ,
An example Dockerfile that is set up for Python would be:
```dockerfile
# Use Python 3.9.6 with minimal packages installed.
# This is a size-saving alternative to using python:3.9.6 as the base image.
FROM python:3.9.6-slim-buster
# Install additional libraries if needed
RUN pip install ...
# Copy files and scripts needed to run the model.
# Enable execution permissions for the script(s).
COPY run_model.py /usr/local/bin/.
RUN chmod +x /usr/local/bin/run_model.py
# Run the Python script upon starting the Docker container.
ENTRYPOINT ["python", "/usr/local/bin/run_model.py"]
```
where **run_model.py** could look something like this:
```python
import os
import argparse
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument("-i", "--input_dir",
type=str, default="/input")
parser.add_argument("-o", "--output_dir",
type=str, default="/output")
return parser.parse_args()
def model(parent):
with open(os.path.join(parent, "00001_t1.nii.gz")) as img:
results = "..."
return results
def main():
args = get_args()
results = model(args.input_dir)
with open(os.path.join(args.output_dir, "00001.nii.gz"), "w") as out:
out.write(results)
if __name__ == "__main__":
main()
```
Hope this helps! Hi @deepX ,
Not sure if you have been receiving our email notifications, but just in case -- the queue for Docker submissions will open on Sept. 1st and will close on Sept. 15th. Hi @trberg , would it be possible to have the instructions for the Docker submission showing an example with a Python script? Thanks hi @trberg , would you please let us know when is the deadline for docker submission? Thanks. Hi @johannesroth,
I've updated the [docker submission instructions](https://www.synapse.org/#!Synapse:syn25829067/wiki/611500) with new, and hopefully clearer instructions. Let me know if anything is still unclear or vague.
Thank you,
@trberg Hi @johannesroth,
Apologies, the instructions are vague. I'll be updating them soon to hopefully clarify them for this challenge. I'll let you know when that is complete.
Thank you,
Tim
Drop files to upload
Unclear instructions for Docker submission page is loading…