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

There is no --cors-allow-origin flag and bind to 0.0.0.0 does not work #110

Closed
2 of 4 tasks
sandangel opened this issue Dec 15, 2023 · 1 comment · Fixed by #162
Closed
2 of 4 tasks

There is no --cors-allow-origin flag and bind to 0.0.0.0 does not work #110

sandangel opened this issue Dec 15, 2023 · 1 comment · Fixed by #162

Comments

@sandangel
Copy link

sandangel commented Dec 15, 2023

System Info

{"model_id":"BAAI/bge-large-en-v1.5","model_sha":"refs/pr/5","model_dtype":"float32","model_type":{"embedding":{"pooling":"cls"}},"max_concurrent_requests":512,"max_input_length":512,"max_batch_tokens":16384,"max_batch_requests":null,"max_client_batch_size":32,"tokenization_workers":10,"version":"0.6.0","sha":"5218224c4d6380897af937797b9a95df487bfba1","docker_label":null}

Information

  • Docker
  • The CLI directly

Tasks

  • An officially supported command
  • My own modifications

Reproduction

text-embeddings-router --help

There is no --cors-allow-origin flag like showed in the README.

Also I have 2 machine in the same network with IPs:

  • 172.16.129.1 <-- running TEI
  • 172.16.129.136

When running with --hostname 0.0.0.0, it can not be reached by other machines in the same network. Within the same machine, I can check curl 172.17.129.1:3000/info. But from the machine 172.17.129.136, I can not run curl 172.17.129.1:3000/info.

Expected behavior

Flag --cors-allow-origin should work. And the router can be reached by other machines within the same network when binding to 0.0.0.0

@karlomikus
Copy link

Same problem here, but you can use ENV variable CORS_ALLOW_ORIGIN. Here's how I'm using it in docker:

environment:
      - CORS_ALLOW_ORIGIN=http://localhost:8080

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

Successfully merging a pull request may close this issue.

2 participants