Validates one submission and copies it to target directory.

    Args:
      submission_path: path in Google Cloud Storage of the submission file

def validate_and_copy_one_submission(self, submission_path):
    """Validates one submission and copies it to target directory.

    Args:
      submission_path: path in Google Cloud Storage of the submission file
    """
    if os.path.exists(self.download_dir):
      shutil.rmtree(self.download_dir)
    os.makedirs(self.download_dir)
    if os.path.exists(self.validate_dir):
      shutil.rmtree(self.validate_dir)
    os.makedirs(self.validate_dir)
    logging.info('\n' + ('#' * 80) + '\n# Processing submission: %s\n'
                 + '#' * 80, submission_path)
    local_path = self.copy_submission_locally(submission_path)
    metadata = self.base_validator.validate_submission(local_path)
    if not metadata:
      logging.error('Submission "%s" is INVALID', submission_path)
      self.stats.add_failure()
      return
    submission_type = metadata['type']
    container_name = metadata['container_gpu']
    logging.info('Submission "%s" is VALID', submission_path)
    self.list_of_containers.add(container_name)
    self.stats.add_success(submission_type)
    if self.do_copy:
      submission_id = '{0:04}'.format(self.cur_submission_idx)
      self.cur_submission_idx += 1
      self.copy_submission_to_destination(submission_path,
                                          TYPE_TO_DIR[submission_type],
                                          submission_id)
      self.id_to_path_mapping[submission_id] = submission_path