'Runs defense inside Docker.
Args:
input_dir: directory with input (adversarial images).
output_dir: directory to write output (classification result).'

def run(self, input_dir, output_dir):

    print('Running    defense    ', self.name)
    cmd = [self.docker_binary(), 'run', '-v', '{0}:/input_images'.format(input_dir), '-v', '{0}:/output_data'.format(output_dir), '-v', '{0}:/code'.format(self.directory), '-w', '/code', self.container, ('./' + self.entry_point), '/input_images', '/output_data/result.csv']
    print('    '.join(cmd))
    subprocess.call(cmd)
