Hello. I’m doing some experiments to run Java code within a Python driver in a Ray Kubernetes cluster.
I already have the cluster up using the Kubernetes operator, and I’ve successfully tested the run on head strategy:
-
I’ve built my own custom Ray Docker image with Java Installed, and with my fat jar. I use that image for the head/workers pods.
-
I can run the application on the head node running the driver. Driver code
That run on head strategy works fine.
My problem is when I’ve tried to test the Kubernetes job strategy. In that case, the example driver connects to the cluster using the Ray Client:
if __name__ == "__main__":
head_service_ip = os.environ[HEAD_SERVICE_IP_ENV]
client_port = os.environ[HEAD_SERVICE_CLIENT_PORT_ENV]
ray.util.connect(f"{head_service_ip}:{client_port}")
main()
What’s the right way to set the code search path for my .jar
in the job driver code?
Since the code example isn’t using ray.init()
, I haven’t been able to find it.
Thank you !