Hi there, I was trying to configure the service to...
# ask-for-help
k
Hi there, I was trying to configure the service to use a different port than the default 3000 port. However, setting @bentoml.service(http={"port": 5000}) did not help and it keeps running on port 3000. More importantly the docker container runs on this port as well. Do you have any idea why this might be?
j
Hi, we have noticed this and we are fixing it!
k
Thank you @Jian Shen Yap for this awesomely quick response 🙂 Out of curiosity: is there any timeline to when it will be fixed?
j
meanwhile can you use the cli
bentoml serve --port
to configure to a different port?
k
Running locally is not the issue, however when deploying the built container to our k8s cluster we're running into this as we by default only allow requests to port 8000
j
the next release should fix this, sometime next week!
k
awesome, thank you
j
for now for docker container, you can use a $PORT or $BENTOML_PORT environment variable to override that
k
@Jian Shen Yap set those when building the image or where? Would you by any chance have an example command?
j
you can use the
-e
flag when you do
docker run
for example,
docker run -e BENTOML_PORT 7000 <image tag>
k
Hi @Jian Shen Yap is there any update on the fix for the port in the annotation?
j
We have an open PR that is not merged yet. https://github.com/bentoml/BentoML/pull/4776/files would you please try if this works?
k
Thank you. Seems to accept it locally now. I have not followed up as we adjusted our deployment to now use the default bent port. But thank you for being so helpful and fixing this issue