EnergonAI
EnergonAI copied to clipboard
Connection refused on docker exposed port
Problem
If we docker run energonai like:
docker run -ti --gpus all --rm --ipc=host -p 8010:8010 ...
Then in container run:
export PYTHONPATH=/workspace/colossal/inference/examples/bert
energonai service init --config_file=/workspace/colossal/inference/examples/bert/bert_config.py
The access to "http://localhost:8010/" got rejected.
Root cause
server_host in configuration files was wrongly configured to "127.0.0.1". It should be set to "0.0.0.0". All config files should be updated. For example, the file examples/bert/bert_config.py:
server_host = "127.0.0.1"
=> server_host = "0.0.0.0"
Thanks for your correction