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

Gradio interface has hardcoded server-address of 0.0.0.0, making it not possible to open the URL directly #108

Open
Digioso opened this issue Feb 17, 2025 · 3 comments

Comments

@Digioso
Copy link

Digioso commented Feb 17, 2025

Row 391 in gradio_interface.py:

demo.launch(server_name="0.0.0.0", server_port=7860, share=share)

Fix:
demo.launch(server_name="127.0.0.1", server_port=7860, share=share)

@darkacorn
Copy link
Contributor

0.0.0.0 is all available addresses

@ksanjeev284
Copy link

ksanjeev284 commented Feb 17, 2025

I found when running docker container 0.0.0.0:7860 does not open instead try http://localhost:7860/ ,

also you can modify YAML file as

version: '3.8'

services:
  zonos:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: zonos_container
    runtime: nvidia
    stdin_open: true
    tty: true
    command: ["python3", "gradio_interface.py"]
    environment:
      - NVIDIA_VISIBLE_DEVICES=0
      - GRADIO_SHARE=False
    ports:
      - "7860:7860"

@Digioso
Copy link
Author

Digioso commented Feb 18, 2025

That's why I suggested to change it to 127.0.0.1 (or localhost).
So that you can just click on the link in the CLI and do not have to manually type the address into your browser.

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

No branches or pull requests

3 participants