Foundry currently binds to port 5272 only to 127.0.0.1
>netstat -an | find "5272"
TCP 127.0.0.1:5272 0.0.0.0:0 LISTENING
TCP [::1]:5272 [::]:0 LISTENING
This makes it challenging to connect to the REST API from WSL2 and from local devcontainers docker as the port is not exposed to them.
For example the following curl call from WSL2 gets blocked
curl --verbose http://$(hostname).local:11434/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "phi3:latest",
"messages": [{"role": "user", "content": "What is the capital of France?"}],
"temperature": 0.7,
"max_tokens": 50
}'
When using Ollama, I and many others typically develop in docker devcontainers and connect to Ollama running on windows.
Ollama provides option OLLAMA_HOST. When this is set to 0.0.0.0 through set OLLAMA_HOST="0.0.0.0" it exposes the port to the network. Firewalls on the machine will prevent it to be exposed further
>netstat -an | find "11434"
TCP 0.0.0.0:11434 0.0.0.0:0 LISTENING
TCP [::]:11434 [::]:0 LISTENING
Suggestion is to add FOUNDRY_HOST which does the same or add some otherway of configuring the ip-address foundry is bound to.
Foundry currently binds to port 5272 only to 127.0.0.1
This makes it challenging to connect to the REST API from WSL2 and from local devcontainers docker as the port is not exposed to them.
For example the following curl call from WSL2 gets blocked
When using Ollama, I and many others typically develop in docker devcontainers and connect to Ollama running on windows.
Ollama provides option OLLAMA_HOST. When this is set to 0.0.0.0 through
set OLLAMA_HOST="0.0.0.0"it exposes the port to the network. Firewalls on the machine will prevent it to be exposed furtherSuggestion is to add FOUNDRY_HOST which does the same or add some otherway of configuring the ip-address foundry is bound to.