o
    xi                     @   sf   d Z ddlZddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ eeZG d	d
 d
eZdS )zLocal registry implementation.    N)Self)is_docker_installedLaunchError)docker_image_exists   )AbstractRegistryc                   @   sp   e Zd ZdZdddZededefddZdd	d
Z	de
eef fddZdefddZdedefddZdS )LocalRegistryzaA local registry.

    This is a dummy registry that is used when no registry is configured.
    returnNc                 C   s   dS )zInitialize a local registry.N selfr   r   \/home/ubuntu/.local/lib/python3.10/site-packages/wandb/sdk/launch/registry/local_registry.py__init__   s    zLocalRegistry.__init__configc                 C   s   |  S )a  Create a local registry from a config.

        Arguments:
            config (dict): The config. This is ignored.
            environment (AbstractEnvironment): The environment. This is ignored.

        Returns:
            LocalRegistry: The local registry.
        r   )clsr   r   r   r   from_config   s   zLocalRegistry.from_configc                       dS )z+Verify the local registry by doing nothing.Nr   r   r   r   r   verify)   s    zLocalRegistry.verifyc                    s
   t d)z4Get the username and password of the local registry.z9Attempted to get username and password for LocalRegistry.r   r   r   r   r   get_username_password,   s   z#LocalRegistry.get_username_passwordc                    r   )zNGet the uri of the local registry.

        Returns: An empty string.
         r   r   r   r   r   get_repo_uri0   s   zLocalRegistry.get_repo_uri	image_uric                    s   t  rt|S dS )zCheck if an image exists in the local registry.

        Arguments:
            image_uri (str): The uri of the image.

        Returns:
            bool: True.
        F)r   r   )r   r   r   r   r   check_image_exists7   s   	z LocalRegistry.check_image_exists)r
   N)__name__
__module____qualname____doc__r   classmethoddictr   r   r   tuplestrr   r   boolr   r   r   r   r   r	      s    

r	   )r   loggingtyping_extensionsr   wandb.dockerr   wandb.sdk.launch.errorsr   wandb.sdk.launch.utilsr   abstractr   	getLoggerr   _loggerr	   r   r   r   r   <module>   s    
