rm: cannot remove '/OUTPUTS/*': No such file or directory

After running docker run -it --rm masidocker/public:liver_attenuation_v3_0_3 bash I found that the /extra/run_deep_wholebody_dicom.sh script calls, among other commands, an /extra/bash1.sh script which starts:

#!/bin/bash
start=$(date +%s.%N)
# dicom to nifty
rm -r /OUTPUTS/*

... and continues. It's this rm -r /OUTPUTS/* command that's generating the error because the /OUTPUTS/ directory is empty at that point.

As for fixing it, I think the best solution would be to ask the upstream image owner to change the code in /extra/bash1.sh to:

...
rm -rf /OUTPUTS/*
...

The best place for that may be the Issues page of the Docker repo.

Short of that, you could run the image with stderr dropped to /dev/null:

sudo docker run -it --rm -v $input_dir:/INPUTS/ -v $output_dir:/OUTPUTS masidocker/public:liver_attenuation_v3_0_3 /extra/run_deep_wholebody_dicom.sh 2>/dev/null

... where I've simply added 2>/dev/null to the end of your existing docker run command.

Another alternative (thanks to Stephen Kitt for mentioning it) would be to create a sacrificial file in that directory before executing the script:

touch $output_dir/tempfile && sudo docker run -it --rm -v $input_dir:/INPUTS/ -v $output_dir:/OUTPUTS masidocker/public:liver_attenuation_v3_0_3 /extra/run_deep_wholebody_dicom.sh