class_docstr: Class to run attack submissions.
class_docstr_tok: ["Class","to","run","attack","submissions","."]
docstr: Runs attack inside Docker.
  
  Args:
    input_dir: directory with input (dataset).
    output_dir: directory where output (adversarial images) should be written.
    epsilon: maximum allowed size of adversarial perturbation,
      should be in range [0, 255].
  
  Returns:
    how long it took to run submission in seconds
docstr_tok: ["Runs","attack","inside","Docker",".","Args",":","input_dir",":","directory","with","input","(","dataset",")",".","output_dir",":","directory","where","output","(","adversarial","images",")","should","be","written",".","epsilon",":","maximum","allowed","size","of","adversarial","perturbation",",","should","be","in","range","[","0",",","255","]",".","Returns",":","how","long","it","took","to","run","submission","in","seconds"]
code: def run(self, input_dir, output_dir, epsilon):
      """Runs attack inside Docker.
  
      Args:
        input_dir: directory with input (dataset).
        output_dir: directory where output (adversarial images) should be written.
        epsilon: maximum allowed size of adversarial perturbation,
          should be in range [0, 255].
  
      Returns:
        how long it took to run submission in seconds
      """
      logging.info("Running attack %s", self.submission_id)
      tmp_run_dir = self.temp_copy_extracted_submission()
      cmd = [
          "--network=none",
          "-m=24g",
          "--cpus=3.75",
          "-v",
          "{0}:/input_images:ro".format(input_dir),
          "-v",
          "{0}:/output_images".format(output_dir),
          "-v",
          "{0}:/code".format(tmp_run_dir),
          "-w",
          "/code",
          self.container_name,
          "./" + self.entry_point,
          "/input_images",
          "/output_images",
          str(epsilon),
      ]
      elapsed_time_sec = self.run_with_time_limit(cmd)
      sudo_remove_dirtree(tmp_run_dir)
      return elapsed_time_sec
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from builtins import int
  import argparse
  import json
  import logging
  import os
  import random
  import shutil
  import subprocess
  import time
  import uuid
  from six import iteritems
  import eval_lib
  from cleverhans.utils import shell_call
label_desc: Use image node_id 2 for calling the AttackSubmission obj's underlying member method code with example usage: obj.run(input_dir, output_dir, epsilon) and returns: elapsed_time_sec