Worker_dir location referenced in environment variables

I am using ray.init() with worker_dir specified in the runtime_env, in order to transport some code from local to the workers.

Part of the code relies upon on environment variable being set, locating where the code I have transported is. It is functionally the similar as PYTHONPATH, and I see that PYTHONPATH is set to the working_dir. I would like to set “OTHERPATH” to be working_dir/src.

I have tried using PYTHONPATH (which gets replaced with “”) and using RAY_RUNTIME_ENV_CREATE_WORKING_DIR which didn’t work either.

Any ideas?

1. Severity of the issue: (select one)
Medium: Significantly affects my productivity but can find a workaround.

2. Environment:

  • Ray version: 2.43
  • Python version: 3.11
  • OS: RH 8.8
  • Cloud/Infrastructure: AWS Kube
  • Other libs/tools (if relevant):

3. What happened vs. what you expected:

  • Expected: I wanted to set an environment variable which references the location of working_dir
  • Actual: I wasn’t able to.

Hi @christhorn2

Unfortunately, currently it’s not possible. Could you file a Github feature request for it?

Yup absolutely, thanks for the reply