I have created a ray by docker on a machine. When running ray status, it prints successfully. But when running ray.init() in the python code, it comes up with – Can’t find a node_ip_address.json file from /tmp/ray/session_2023-10-15_07-38-15_725441_7. Have you started Ray instsance using ray start or ray.init?
Can you try ray.init(address="ip:port") to see if that solves the problem?
I had the same issue. Turns out you need to mount /tmp to the docker container that ray is using. You can do this in the yaml file if you use ‘ray up ’. After that the ray cluster started successfully for me.
Sadly the default example config in github does not have it: ray/python/ray/autoscaler/local/example-full.yaml at eacc763c84d47c9c5b86b26a32fd62c685be84e6 · ray-project/ray · GitHub
Just add:
docker:
run_options:
- -v /tmp:/tmp
