class_docstr: An RPC server to create and delete runtime envs.
  
  Attributes:
      dashboard_agent: The DashboardAgent object contains global config.
class_docstr_tok: ["An","RPC","server","to","create","and","delete","runtime","envs",".","Attributes",":","dashboard_agent",":","The","DashboardAgent","object","contains","global","config","."]
code: def __init__(
      self,
      runtime_env_dir,
      logging_params,
      gcs_address,
      temp_dir,
      address,
      runtime_env_agent_port,
  ):
      super().__init__()
      self._runtime_env_dir = runtime_env_dir
      self._logging_params = logging_params
      self._gcs_address = gcs_address
      self._per_job_logger_cache = dict()
      # Cache the results of creating envs to avoid repeatedly calling into
      # conda and other slow calls.
      self._env_cache: Dict[str, CreatedEnvResult] = dict()
      # Maps a serialized runtime env to a lock that is used
      # to prevent multiple concurrent installs of the same env.
      self._env_locks: Dict[str, asyncio.Lock] = dict()
      self._gcs_aio_client = GcsAioClient(address=self._gcs_address)
  
      self._pip_plugin = PipPlugin(self._runtime_env_dir)
      self._conda_plugin = CondaPlugin(self._runtime_env_dir)
      self._py_modules_plugin = PyModulesPlugin(
          self._runtime_env_dir, self._gcs_aio_client
      )
      self._java_jars_plugin = JavaJarsPlugin(
          self._runtime_env_dir, self._gcs_aio_client
      )
      self._working_dir_plugin = WorkingDirPlugin(
          self._runtime_env_dir, self._gcs_aio_client
      )
      # TODO(jonathan-anyscale): change the plugin to ProfilerPlugin
      # and unify with nsight and other profilers.
      self._nsight_plugin = NsightPlugin(self._runtime_env_dir)
      self._container_manager = ContainerManager(temp_dir)
      self._mpi_plugin = MPIPlugin()
  
      # TODO(architkulkarni): "base plugins" and third-party plugins should all go
      # through the same code path.  We should never need to refer to
      # self._xxx_plugin, we should just iterate through self._plugins.
      self._base_plugins: List[RuntimeEnvPlugin] = [
          self._working_dir_plugin,
          self._pip_plugin,
          self._conda_plugin,
          self._py_modules_plugin,
          self._java_jars_plugin,
          self._nsight_plugin,
          self._mpi_plugin,
      ]
      self._plugin_manager = RuntimeEnvPluginManager()
      for plugin in self._base_plugins:
          self._plugin_manager.add_plugin(plugin)
  
      self._reference_table = ReferenceTable(
          self.uris_parser,
          self.unused_uris_processor,
          self.unused_runtime_env_processor,
      )
  
      self._logger = default_logger
      self._logging_params.update(filename=self.LOG_FILENAME)
      self._logger = setup_component_logger(
          logger_name=default_logger.name, **self._logging_params
      )
      # Don't propagate logs to the root logger, because these logs
      # might contain sensitive information. Instead, these logs should
      # be confined to the runtime env agent log file `self.LOG_FILENAME`.
      self._logger.propagate = False
  
      self._logger.info(
          "Starting runtime env agent at pid %s", os.getpid()
      )
      self._logger.info(
          "Parent raylet pid is %s", int(os.environ["RAY_RAYLET_PID"])
      )
      self._logger.info(
          "Listening to address %s, port %d",
          address,
          runtime_env_agent_port,
      )
  
imports: import asyncio
  import json
  import logging
  import os
  import time
  import traceback
  from collections import defaultdict
  from dataclasses import dataclass
  from typing import Callable, Dict, List, Set, Tuple
  from ray._private.ray_constants import DEFAULT_RUNTIME_ENV_TIMEOUT_SECONDS
  import ray._private.runtime_env.agent.runtime_env_consts
  from ray._private.ray_logging import setup_component_logger
  from ray._private.runtime_env.conda import CondaPlugin
  from ray._private.runtime_env.container import ContainerManager
  from ray._private.runtime_env.context import RuntimeEnvContext
  from ray._private.runtime_env.java_jars import JavaJarsPlugin
  from ray._private.runtime_env.pip import PipPlugin
  from ray._private.gcs_utils import GcsAioClient
  from ray._private.runtime_env.plugin import RuntimeEnvPlugin, create_for_plugin_if_needed
  from ray._private.utils import get_or_create_event_loop
  from ray._private.runtime_env.plugin import RuntimeEnvPluginManager
  from ray._private.runtime_env.py_modules import PyModulesPlugin
  from ray._private.runtime_env.working_dir import WorkingDirPlugin
  from ray._private.runtime_env.nsight import NsightPlugin
  from ray._private.runtime_env.mpi import MPIPlugin
  from ray.core.generated import runtime_env_agent_pb2, agent_manager_pb2
  from ray.core.generated.runtime_env_common_pb2 import RuntimeEnvState
  from ray.runtime_env import RuntimeEnv, RuntimeEnvConfig
label_desc: Use image node_id 1 to create a new RuntimeEnvAgent object  with example: obj = RuntimeEnvAgent(runtime_env_dir, logging_params, gcs_address, temp_dir, address, runtime_env_agent_port)