Running Ray with Pyinstaller

How severe does this issue affect your experience of using Ray?

  • High: It blocks me to complete my task.

I am attempting to compile a simple ray application into an executable using Pyinstaller but am running into some issues. For context, the application is a simple test program that initializes ray, starts up one actor, then exits. The program works fine locally when run through the terminal.

First problem: When I run the compiled executable, immediately after all dependencies are imported, the program throws the error “ERROR – Couldn’t read dashboard.log file. Error: [Errno 2] No such file or directory”.

I would assume this has to do with the fact that the running environment has changed and Ray no longer has access to the location where log files are stored. Is there a way to disable logging to a file to bypass this? Or otherwise any other workarounds?

Second problem: After this error is thrown, the program attempts to launch many instances of gcs_server subprocesses within the application, which I can see though task manager. This almost immediately consumes all of my CPU resources and freezes my computer. Again, this is a very simple test program so it should be very lightweight.

Any insight on these issues is very much appreciated,

hi @Prolucid_Cole
When you call ray.init, you can specify the ray tmp file path using _temp_dir ray.init — Ray 2.7.1

Reading the docs on. how pyinstaller works, I suspect once you fix the tmp directory Ray probably will work.