class_docstr: A wrapper for running tests in ray ci docker container
class_docstr_tok: ["A","wrapper","for","running","tests","in","ray","ci","docker","container"]
docstr: :param gpu: Number of gpus to use in the container. If 0, used all gpus.
  :param shard_count: The number of shards to split the tests into. This can be
  used to run tests in a distributed fashion.
  :param shard_ids: The list of shard ids to run. If none, run no shards.
docstr_tok: [":","param","gpu",":","Number","of","gpus","to","use","in","the","container",".","If","0",",","used","all","gpus",".",":","param","shard_count",":","The","number","of","shards","to","split","the","tests","into",".","This","can","be","used","to","run","tests","in","a","distributed","fashion",".",":","param","shard_ids",":","The","list","of","shard","ids","to","run",".","If","none",",","run","no","shards","."]
code: def __init__(
      self,
      shard_count: int = 1,
      gpus: int = 0,
      bazel_log_dir: str = "/tmp",
      network: Optional[str] = None,
      test_envs: Optional[List[str]] = None,
      shard_ids: Optional[List[int]] = None,
      skip_ray_installation: bool = False,
      build_type: Optional[str] = None,
  ) -> None:
      """
      :param gpu: Number of gpus to use in the container. If 0, used all gpus.
      :param shard_count: The number of shards to split the tests into. This can be
      used to run tests in a distributed fashion.
      :param shard_ids: The list of shard ids to run. If none, run no shards.
      """
      self.bazel_log_dir = bazel_log_dir
      self.shard_count = shard_count
      self.shard_ids = shard_ids or []
      self.test_envs = test_envs or []
      self.build_type = build_type
      self.network = network
      self.gpus = gpus
      assert (
          self.gpus == 0 or self.gpus >= self.shard_count
      ), f"Not enough gpus ({self.gpus} provided) for {self.shard_count} shards"
  
      if not skip_ray_installation:
          self.install_ray(build_type)
  
imports: import json
  import os
  import platform
  import random
  import shutil
  import string
  import subprocess
  from typing import List, Tuple, Optional
  from os import path, listdir
  from ci.ray_ci.utils import shard_tests, chunk_into_n
  from ci.ray_ci.utils import logger
  from ci.ray_ci.container import Container
  from ray_release.test import TestResult, Test
label_desc: Use image node_id 1 to create a new TesterContainer object from inherited base classes: Container with example: obj = TesterContainer(shard_count, gpus, bazel_log_dir, network, test_envs, shard_ids, skip_ray_installation, build_type)