Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment on Kubernetes/RHOS fails: Cannot connect to the Image Caption Generator REST endpoint #58

Open
ptitzler opened this issue Apr 6, 2020 · 3 comments

Comments

@ptitzler
Copy link
Contributor

ptitzler commented Apr 6, 2020

[04/06/20 15:47:23] INFO: Connecting to ML endpoint at http://localhost:5000/model/predict
[04/06/20 15:47:23] ERROR: Cannot connect to the Image Caption Generator REST endpoint at http://localhost:5000
@ptitzler
Copy link
Contributor Author

ptitzler commented Apr 6, 2020

To fix this we need to add the ability to define the service URL at runtime using an environment variable, making it possible to adjust the setting as needed. Otherwise users will have to either edit the source code https://github.com/IBM/MAX-Image-Caption-Generator-Web-App/blob/master/app.py#L38 or change the Dockerfile https://github.com/IBM/MAX-Image-Caption-Generator-Web-App/blob/master/Dockerfile#L24. Neither of these alternative is a viable solution.

@ptitzler
Copy link
Contributor Author

ptitzler commented Apr 6, 2020

To make this work I had to manually set the endpoint to http://max-image-caption-generator:5000, where max-image-caption-generator is the service name in RHOS.

@ajbozarth
Copy link
Member

Nice catch, this would be fixed by updating the Dockerfile to conditionally set the port and ml-endpoint args based on ENV_VARS or args to the docker command. Those args to app.py already address this issue for cases directly calling the app

@ptitzler ptitzler changed the title Deployment on RHOS fails: Cannot connect to the Image Caption Generator REST endpoint Deployment on Kubernetes/RHOS fails: Cannot connect to the Image Caption Generator REST endpoint May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants