GenAIExamples
GenAIExamples copied to clipboard
[Bug] VisualQnA UI can't access to backend service due to CORS
Priority
Undecided
OS type
Ubuntu
Hardware type
Gaudi2
Installation method
- [X] Pull docker images from hub.docker.com
- [ ] Build docker images from source
Deploy method
- [X] Docker compose
- [ ] Docker
- [ ] Kubernetes
- [ ] Helm
Running nodes
Single Node
What's the version?
Repo
Description
Request from the UI to the backend service seems to be blocked by CORS policy.
It works when I test it from any terminal
~ % curl http://${host_ip}:8888/v1/visualqna -H "Content-Type: application/json" -d '{
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What'\''s in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "https://www.ilankelman.org/stopsigns/australia.jpg"
}
}
]
}
],
"max_tokens": 300
}'
{"id":"chatcmpl-MUqRQ3gWyBjAJqnn4nLuvP","object":"chat.completion","created":1725029828,"model":"visualqna","choices":[{"index":0,"message":{"role":"assistant","content":"The image shows a stop sign at the corner of a street, with a traditional Chinese archway or gateway in the background. There is also a black car driving past the stop sign. The scene suggests a blend of Western and Eastern architectural styles. "},"finish_reason":"stop"}],"usage":{"prompt_tokens":0,"total_tokens":0,"completion_tokens":0}}% ```
### Reproduce steps
```cd docker/gaudi/```
```docker compose up -d```
Try host_ip:5173 in a browser and got time out. Chechking the inspector a CORS restriction is found
### Raw log
_No response_