
    &`i                     r    d dl Z d dlmZmZ d dlmZ d dlmZ  e j        e	          Z
 G d de          ZdS )    N)ListOptional)RuntimeEnvContext)RuntimeEnvPluginc                       e Zd ZdZdZd Zefdee         ddde	de
j        d	ef
d
Zefdee         ddde	dee
j                 fdZdS )PyExecutablePlugina\  This plugin allows running Ray workers with a custom Python executable.

    You can use it with
    `ray.init(runtime_env={"py_executable": "<command> <args>"})`. If you specify
    a `working_dir` in the runtime environment, the executable will have access
    to the working directory, for example, to a requirements.txt for a package manager,
    a script for a debugger, or the executable could be a shell script in the
    working directory. You can also use this plugin to run worker processes
    in a custom profiler or use a custom Python interpreter or `python` with
    custom arguments.
    py_executablec                     d S )N )selfs    z/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/ray/_private/runtime_env/py_executable.py__init__zPyExecutablePlugin.__init__   s        uriruntime_env
RuntimeEnvcontextloggerreturnc                 
   K   dS )Nr   r   )r   r   r   r   r   s        r   createzPyExecutablePlugin.create   s       qr   urisc                 b    |                     d           |                                |_        d S )NzRunning py_executable plugin)infor	   )r   r   r   r   r   s        r   modify_contextz!PyExecutablePlugin.modify_context%   s1     	2333 + 9 9 ; ;r   N)__name__
__module____qualname____doc__namer   default_loggerr   strr   loggingLoggerintr   r   r   r   r   r   r   r   
   s        
 
 D   "0 c] " #	
  
    ,:< <3i< "< #	<
 (< < < < < <r   r   )r#   typingr   r    ray._private.runtime_env.contextr   ray._private.runtime_env.pluginr   	getLoggerr   r!   r   r   r   r   <module>r*      s     ! ! ! ! ! ! ! ! > > > > > > < < < < < <""8,,#< #< #< #< #<) #< #< #< #< #<r   