I want each actor to run with their own dependencies.
I am running in a closed environment where doing pip install at runtime is not an option
In the end I plan to run in static ray cluster on kubernetes Deploying a Static Ray Cluster on Kubernetes — Ray v1.8.0
right now I am running my tests on my ubuntu server directly
To do this, I though about using runtime env feature and setting in env_vars the VIRTUAL_ENV variable.
I created a virtual env where I installed ray[Default] and numpy (which my actor uses)
runtime_env = {
“env_vars”: {
“VIRTUAL_ENV”: “path to virtual env”},
}
I did echo $VIRTUAL_ENV in my pycharm terminal to make sure I am copying the correct path
when I call
counter_actor = Counter.options(runtime_env=runtime_env).remote()
I get
(raylet) [2021-12-01 15:26:45,652 E 21303 21303] agent_manager.cc:134: Not all required Ray dependencies for the runtime_env feature were found. To install the required dependencies, please run pip install 'ray[default]'
.
I tried passing the runtime_env in ray_init (just to make sure it has nothing to do with the actor) and got the same error with the addition of
(raylet) [2021-12-01 15:53:25,881 E 22621 22621] worker_pool.cc:566: [Eagerly] Couldn’t create a runtime environment for job 01000000.
I am sure ray is installed in my virtual environment as I see the ray folder (with dashboard inside so I know it installed the full installation)
How can I run each actor with its own virtual environment?