Deploy gradio app on my own server machine fails

I tried to build & deploy my gradio app using docker, it successfully deployed but can not access to the app externally.

–gradio app code–
app.py

import gradio as gr

app = gr.Blocks()
... ... 
app.queue(concurrency_count=1)
app.launch(enable_queue=True, share=True,
           server_name="0.0.0.0", server_port=7860)

Dockerfile

... ...
RUN mkdir /app
WORKDIR /app
... ...
EXPOSE 7860

CMD ["python", "app.py"]

Deploy cmd

docker run -d -p 7860:7860 --name my_app image_name

Then I try to visit priviate_server_ip:7860, but I can not see the app interface
image

hi @stevezkw are you deploying it on Spaces? if so, here is a Gradio Dockerfile working example

Hi @radames Thank you for your response, I am not deploying it on Spaces, instead, deploying on a remote machine.
But I am curious where I should correct in my Dockerfile, because I don’t know which step is wrong , so I still confused how can I make it work

Thank you

hi @stevezkw I see, sorry I just noticed the issue, please disable share i.e. share=False when running on local/remote machine. share enable a reverse proxy via Gradio servers Sharing Your App

1 Like

Oh Thank you for your great suggestion @radames

I’ll just try it out, and will keep you updated when I have new result

Thank you so much

1 Like

Hi @radames , update:

after setting share=False, and build + push + pull + deploy again

Still see the same result: :smiling_face_with_tear:
image

But thank you for your advice :innocent:

sorry @stevezkw , I’m not sure if I can help since it’s a different provider, however I’d suggest you to test your Dockerfile on our Spaces docker sdk and then try on your provider

1 Like

Hi @radames I found the reason, my fault :joy:
I am sorry, I made a typal mistake on version number:

after correcting, I success:

Thank you for your friendly and patient helps :+1:

1 Like