Closed jayanthnair closed 1 year ago
@jayanthnair Finally got to the root of this. So everything was working as intended. This is not a bug. The host will be passed by the serve run
command correct if there are no previously started service. The issue is that in the serve_agent.py
file, it already called serve.run()
without a host argument. So the default behavior is to start Ray Serve on 127.0.0.1. Since Ray Serve is already started by the script, the serve run
command won't restart it on host 0.0.0.0 and it remains private.
Can you try it again with the following two things:
Dockerfile
to ENTRYPOINT ["serve", "run", "--host", "0.0.0.0", "serve_agent:agent"]
so serve run command can start Ray Serve publiclyserve_agent.py
that runs serve.run()
so serve won't be started on local onlyLet me know if this helps solving the issue 🙂
Solved! Thanks again @GeneDer
@jayanthnair Finally got to the root of this. So everything was working as intended. This is not a bug. The host will be passed by the
serve run
command correct if there are no previously started service. The issue is that in theserve_agent.py
file, it already calledserve.run()
without a host argument. So the default behavior is to start Ray Serve on 127.0.0.1. Since Ray Serve is already started by the script, theserve run
command won't restart it on host 0.0.0.0 and it remains private.Can you try it again with the following two things:
- change the last line of
Dockerfile
toENTRYPOINT ["serve", "run", "--host", "0.0.0.0", "serve_agent:agent"]
so serve run command can start Ray Serve publicly- remove the last line of
serve_agent.py
that runsserve.run()
so serve won't be started on local onlyLet me know if this helps solving the issue 🙂
I have the same problem, but I got Error: No such option: --host
after i execute serve run --host "0.0.0.0" demo:app
.
Yes, I think this is a regression-- did we take out the option to pass --host?
@jayanthnair Finally got to the root of this. So everything was working as intended. This is not a bug. The host will be passed by the
serve run
command correct if there are no previously started service. The issue is that in theserve_agent.py
file, it already calledserve.run()
without a host argument. So the default behavior is to start Ray Serve on 127.0.0.1. Since Ray Serve is already started by the script, theserve run
command won't restart it on host 0.0.0.0 and it remains private. Can you try it again with the following two things:
- change the last line of
Dockerfile
toENTRYPOINT ["serve", "run", "--host", "0.0.0.0", "serve_agent:agent"]
so serve run command can start Ray Serve publicly- remove the last line of
serve_agent.py
that runsserve.run()
so serve won't be started on local onlyLet me know if this helps solving the issue 🙂
I have the same problem, but I got
Error: No such option: --host
after i executeserve run --host "0.0.0.0" demo:app
.
Please, use the following syntax before serve.run()
call:
serve.start(http_options={"host": "0.0.0.0", "port": 5000})
What happened + What you expected to happen
Following up on 37107, when deploying a trained DRL agent as a docker container and querying it for responses, when I create the container like below:
Build and run it like below:
And query it using cURL commands or requests from my local machine, I get a connectionerror
Following @GeneDer's recommendation as linked [here] (https://github.com/ray-project/ray/issues/37107#issuecomment-1623994721) was the only way I was able to query the container for responses. The expected behavior is for the original dockerfile and build process to be sufficient to query the container.
Versions / Dependencies
Reproduction script
Issue Severity
Medium: It is a significant difficulty but I can work around it.