5 # Automatically parallelize this job by running one task per file.
6 arvados.job_setup.one_task_per_input_file(if_sequence=0, and_end_task=True, input_as_path=True)
8 # Get the input file for the task
9 input_file = arvados.get_task_param_mount('input')
11 # Run the external 'md5sum' program on the input file
12 stdoutdata, stderrdata = arvados.util.run_command(['md5sum', input_file])
14 # Save the standard output (stdoutdata) to "md5sum.txt" in the output collection
15 out = arvados.CollectionWriter()
16 out.set_current_file_name("md5sum.txt")
18 arvados.current_task().set_output(out.finish())