class_docstr: Builds a docker image for a project.
  
  Attributes:
      builder_config (Dict[str, Any]): The builder config.
class_docstr_tok: ["Builds","a","docker","image","for","a","project",".","Attributes",":","builder_config","(","Dict","[","str",",","Any","]",")",":","The","builder","config","."]
docstr: Create a DockerBuilder from a config.
  
  Arguments:
      config (Dict[str, Any]): The config.
      registry (AbstractRegistry): The registry to use.
      verify (bool, optional): Whether to verify the functionality of the builder.
      login (bool, optional): Whether to login to the registry.
  
  Returns:
      DockerBuilder: The DockerBuilder.
docstr_tok: ["Create","a","DockerBuilder","from","a","config",".","Arguments",":","config","(","Dict","[","str",",","Any","]",")",":","The","config",".","registry","(","AbstractRegistry",")",":","The","registry","to","use",".","verify","(","bool",",","optional",")",":","Whether","to","verify","the","functionality","of","the","builder",".","login","(","bool",",","optional",")",":","Whether","to","login","to","the","registry",".","Returns",":","DockerBuilder",":","The","DockerBuilder","."]
code: def from_config(
      cls,
      config: Dict[str, Any],
      environment: AbstractEnvironment,
      registry: AbstractRegistry,
  ) -> "DockerBuilder":
      """Create a DockerBuilder from a config.
  
      Arguments:
          config (Dict[str, Any]): The config.
          registry (AbstractRegistry): The registry to use.
          verify (bool, optional): Whether to verify the functionality of the builder.
          login (bool, optional): Whether to login to the registry.
  
      Returns:
          DockerBuilder: The DockerBuilder.
      """
      # If the user provided a destination URI in the builder config
      # we use that as the registry.
      image_uri = config.get("destination")
      if image_uri:
          if registry is not None:
              wandb.termwarn(
                  f"{LOG_PREFIX}Overriding registry from registry config"
                  f" with {image_uri} from builder config."
              )
          registry = registry_from_uri(image_uri)
  
      return cls(environment, registry, config)
  
file_path: wandb/wandb/sdk/launch/builder/docker_builder.py
imports: import logging
  import os
  from typing import Any, Dict, Optional
  import wandb
  import wandb.docker
  from wandb.sdk.launch.agent.job_status_tracker import JobAndRunStatusTracker
  from wandb.sdk.launch.builder.abstract import AbstractBuilder
  from wandb.sdk.launch.builder.build import registry_from_uri
  from wandb.sdk.launch.environment.abstract import AbstractEnvironment
  from wandb.sdk.launch.registry.abstract import AbstractRegistry
  from .._project_spec import EntryPoint, LaunchProject, create_metadata_file, get_entry_point_command
  from ..errors import LaunchDockerError, LaunchError
  from ..registry.local_registry import LocalRegistry
  from ..utils import LOG_PREFIX, event_loop_thread_exec, sanitize_wandb_api_key, warn_failed_packages_from_build_logs
  from .build import _create_docker_build_ctx, generate_dockerfile, image_tag_from_dockerfile_and_source, validate_docker_installation
label_desc: Use image node_id 2 for calling the DockerBuilder obj's underlying member method code with example usage: obj.from_config(cls, config, environment, registry) and returns: cls