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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

With gradio==4.18.0, only get loading screen for server for remote connections going through nginx #7391

Closed
1 task done
pseudotensor opened this issue Feb 12, 2024 · 38 comments 路 Fixed by #7411
Closed
1 task done
Labels
bug Something isn't working cloud Issues that only happen when deploying Gradio on cloud services

Comments

@pseudotensor
Copy link
Contributor

pseudotensor commented Feb 12, 2024

Describe the bug

With gradio==4.18.0, only get loading screen for server for remote connections

Have you searched existing issues? 馃攷

  • I have searched and found no existing issues

Reproduction

No repro yet, but it works locally, but not when using nginx on remote server.

It happens each time I switch back and forth. So something new broke nginx/proxy use in gradio 4.18.0.

For gradio 4.18.0, using non-ngnix name, just raw ip/port, works fine. So definitely proxy issue that wasn't there in 4.17.0.

Screenshot

image

Logs

No response

System Info

gradio==4.18.0 gradio_client=0.10.0


For exact same code, just switching back to gradio==4.17.0 gradio_client=0.9.0 and no issues.

Severity

Blocking usage of gradio

@pseudotensor pseudotensor added the bug Something isn't working label Feb 12, 2024
@pseudotensor pseudotensor changed the title With gradio==4.18.0, only get loading screen for server for remote connections With gradio==4.18.0, only get loading screen for server for remote connections going through nginx Feb 12, 2024
pseudotensor added a commit to h2oai/h2ogpt that referenced this issue Feb 12, 2024
pseudotensor added a commit to h2oai/h2ogpt that referenced this issue Feb 12, 2024
@pseudotensor
Copy link
Contributor Author

Plausible breaking changes: #7374

FYI @abidlabs

@pseudotensor
Copy link
Contributor Author

pseudotensor commented Feb 12, 2024

Related of course, but not same issue: #6920

Would be good if both related issues were fixed. I'm back to gradio 3.50.2 again because of these two regressions.

@pngwn
Copy link
Member

pngwn commented Feb 12, 2024

Could you open your browser console and tell us if there are any errors being reported?

@abidlabs abidlabs added the cloud Issues that only happen when deploying Gradio on cloud services label Feb 12, 2024
@abidlabs
Copy link
Member

Hmm yes it would be great if you could share a repro with the nginx config as well please @pseudotensor

@abidlabs abidlabs added the needs repro Awaiting full reproduction label Feb 12, 2024
@pseudotensor
Copy link
Contributor Author

pseudotensor commented Feb 12, 2024

Dev console in bad 4.18.0 case:

index.js:1181 Mixed Content: The page at 'https://xxxx.ai/' was loaded over HTTPS, but requested an insecure resource 'http://xxxx.ai/info'. This request has been blocked; the content must be served over HTTPS.
view_api @ index.js:1181
config_success @ index.js:441
(anonymous) @ index.js:481
await in (anonymous) (async)
client2 @ index.js:403
(anonymous) @ Index.svelte:254
run @ svelte.js:41
(anonymous) @ svelte.js:3149
flush @ svelte.js:2108
init @ svelte.js:3266
Index @ Index.svelte:357
connectedCallback @ main.ts:109
await in connectedCallback (async)
create_custom_element @ main.ts:211
(anonymous) @ main.ts:214
index.js:443 Could not get api details: Failed to fetch
config_success @ index.js:443
await in config_success (async)
(anonymous) @ index.js:481
await in (anonymous) (async)
client2 @ index.js:403
(anonymous) @ Index.svelte:254
run @ svelte.js:41
(anonymous) @ svelte.js:3149
flush @ svelte.js:2108
init @ svelte.js:3266
Index @ Index.svelte:357
connectedCallback @ main.ts:109
await in connectedCallback (async)
create_custom_element @ main.ts:211
(anonymous) @ main.ts:214
css.ts:18 Mixed Content: The page at 'https://xxxx.ai/' was loaded over HTTPS, but requested an insecure stylesheet 'http://xxxx.ai/theme.css'. This request has been blocked; the content must be served over HTTPS.
(anonymous) @ css.ts:18
mount_css @ css.ts:12
mount_custom_css @ Index.svelte:139
(anonymous) @ Index.svelte:267
await in (anonymous) (async)
run @ svelte.js:41
(anonymous) @ svelte.js:3149
flush @ svelte.js:2108
init @ svelte.js:3266
Index @ Index.svelte:357
connectedCallback @ main.ts:109
await in connectedCallback (async)
create_custom_element @ main.ts:211
(anonymous) @ main.ts:214
css.ts:15 Unable to preload CSS for http://xxxx.ai/theme.css
(anonymous) @ css.ts:15
error (async)
(anonymous) @ css.ts:14
mount_css @ css.ts:12
mount_custom_css @ Index.svelte:139
(anonymous) @ Index.svelte:267
await in (anonymous) (async)
run @ svelte.js:41
(anonymous) @ svelte.js:3149
flush @ svelte.js:2108
init @ svelte.js:3266
Index @ Index.svelte:357
connectedCallback @ main.ts:109
await in connectedCallback (async)
create_custom_element @ main.ts:211
(anonymous) @ main.ts:214
Toast.svelte:8 TypeError: ((intermediate value) || (intermediate value)) is not a function
    at load_component (Toast.svelte:8:27)
    at Blocks.svelte:284:15
    at Array.forEach (<anonymous>)
    at prepare_components (Blocks.svelte:228:14)
    at $$self.$$.update (Blocks.svelte:157:25)
    at init (svelte.js:3246:5)
    at new Blocks (Blocks.svelte:707:31)
    at Array.create_if_block_1 (Index.svelte:425:26)
    at Object.p (Index.svelte:373:102)
    at update_slot_base (svelte.js:203:8)
load_component @ Toast.svelte:8
(anonymous) @ Blocks.svelte:284
prepare_components @ Blocks.svelte:228
$$self.$$.update @ Blocks.svelte:157
init @ svelte.js:3246
Blocks @ Blocks.svelte:707
create_if_block_1 @ Index.svelte:425
p @ Index.svelte:373
update_slot_base @ svelte.js:203
p @ Embed.svelte:27
update @ svelte.js:2128
flush @ svelte.js:2088
Promise.then (async)
schedule_update @ svelte.js:2029
make_dirty @ svelte.js:3183
(anonymous) @ svelte.js:3241
get_blocks @ Index.svelte:308
await in get_blocks (async)
load_demo @ Index.svelte:317
$$self.$$.update @ Index.svelte:303
update @ svelte.js:2124
flush @ svelte.js:2088
Promise.then (async)
schedule_update @ svelte.js:2029
make_dirty @ svelte.js:3183
(anonymous) @ svelte.js:3241
(anonymous) @ Index.svelte:254
await in (anonymous) (async)
run @ svelte.js:41
(anonymous) @ svelte.js:3149
flush @ svelte.js:2108
init @ svelte.js:3266
Index @ Index.svelte:357
connectedCallback @ main.ts:109
await in connectedCallback (async)
create_custom_element @ main.ts:211
(anonymous) @ main.ts:214
Toast.svelte:8 Mixed Content: The page at 'https://xxxx.ai/' was loaded over HTTPS, but requested an insecure stylesheet 'http://xxxx.ai/custom_component/9c14b63825390c62b904cb0c1cded6bf/component/style.css'. This request has been blocked; the content must be served over HTTPS.
(anonymous) @ Toast.svelte:8
load_css @ Toast.svelte:8
load_component @ Toast.svelte:8
(anonymous) @ Blocks.svelte:284
prepare_components @ Blocks.svelte:228
$$self.$$.update @ Blocks.svelte:157
init @ svelte.js:3246
Blocks @ Blocks.svelte:707
create_if_block_1 @ Index.svelte:425
p @ Index.svelte:373
update_slot_base @ svelte.js:203
p @ Embed.svelte:27
update @ svelte.js:2128
flush @ svelte.js:2088
Promise.then (async)
schedule_update @ svelte.js:2029
make_dirty @ svelte.js:3183
(anonymous) @ svelte.js:3241
get_blocks @ Index.svelte:308
await in get_blocks (async)
load_demo @ Index.svelte:317
$$self.$$.update @ Index.svelte:303
update @ svelte.js:2124
flush @ svelte.js:2088
Promise.then (async)
schedule_update @ svelte.js:2029
make_dirty @ svelte.js:3183
(anonymous) @ svelte.js:3241
(anonymous) @ Index.svelte:254
await in (anonymous) (async)
run @ svelte.js:41
(anonymous) @ svelte.js:3149
flush @ svelte.js:2108
init @ svelte.js:3266
Index @ Index.svelte:357
connectedCallback @ main.ts:109
await in connectedCallback (async)
create_custom_element @ main.ts:211
(anonymous) @ main.ts:214
Toast.svelte:8 failed to load: pdf
load_component @ Toast.svelte:8
await in load_component (async)
(anonymous) @ Blocks.svelte:284
prepare_components @ Blocks.svelte:228
$$self.$$.update @ Blocks.svelte:157
init @ svelte.js:3246
Blocks @ Blocks.svelte:707
create_if_block_1 @ Index.svelte:425
p @ Index.svelte:373
update_slot_base @ svelte.js:203
p @ Embed.svelte:27
update @ svelte.js:2128
flush @ svelte.js:2088
Promise.then (async)
schedule_update @ svelte.js:2029
make_dirty @ svelte.js:3183
(anonymous) @ svelte.js:3241
get_blocks @ Index.svelte:308
await in get_blocks (async)
load_demo @ Index.svelte:317
$$self.$$.update @ Index.svelte:303
update @ svelte.js:2124
flush @ svelte.js:2088
Promise.then (async)
schedule_update @ svelte.js:2029
make_dirty @ svelte.js:3183
(anonymous) @ svelte.js:3241
(anonymous) @ Index.svelte:254
await in (anonymous) (async)
run @ svelte.js:41
(anonymous) @ svelte.js:3149
flush @ svelte.js:2108
init @ svelte.js:3266
Index @ Index.svelte:357
connectedCallback @ main.ts:109
await in connectedCallback (async)
create_custom_element @ main.ts:211
(anonymous) @ main.ts:214
Toast.svelte:8 undefined
load_component @ Toast.svelte:8
await in load_component (async)
(anonymous) @ Blocks.svelte:284
prepare_components @ Blocks.svelte:228
$$self.$$.update @ Blocks.svelte:157
init @ svelte.js:3246
Blocks @ Blocks.svelte:707
create_if_block_1 @ Index.svelte:425
p @ Index.svelte:373
update_slot_base @ svelte.js:203
p @ Embed.svelte:27
update @ svelte.js:2128
flush @ svelte.js:2088
Promise.then (async)
schedule_update @ svelte.js:2029
make_dirty @ svelte.js:3183
(anonymous) @ svelte.js:3241
get_blocks @ Index.svelte:308
await in get_blocks (async)
load_demo @ Index.svelte:317
$$self.$$.update @ Index.svelte:303
update @ svelte.js:2124
flush @ svelte.js:2088
Promise.then (async)
schedule_update @ svelte.js:2029
make_dirty @ svelte.js:3183
(anonymous) @ svelte.js:3241
(anonymous) @ Index.svelte:254
await in (anonymous) (async)
run @ svelte.js:41
(anonymous) @ svelte.js:3149
flush @ svelte.js:2108
init @ svelte.js:3266
Index @ Index.svelte:357
connectedCallback @ main.ts:109
await in connectedCallback (async)
create_custom_element @ main.ts:211
(anonymous) @ main.ts:214
xxxx.ai/:1 Uncaught (in promise) undefined

I can't just share screenshot since it has private information. So I've redacted the text above for DNS to xxxx.ai.

For completeness, for h2oGPT, the only error in dev console I get when using 4.17.0 is the TypeError one and 2 warnings w.r.t. non-interactive or hidden tab that are probably ignorable:

Toast.svelte:8 TypeError: ((intermediate value) || (intermediate value)) is not a function
    at load_component (Toast.svelte:8:27)
    at Blocks.svelte:284:15
    at Array.forEach (<anonymous>)
    at prepare_components (Blocks.svelte:228:14)
    at $$self.$$.update (Blocks.svelte:157:25)
    at init (svelte.js:3246:5)
    at new Blocks (Blocks.svelte:707:31)
    at Array.create_if_block_1 (Index.svelte:423:26)
    at Object.p (Index.svelte:371:102)
    at update_slot_base (svelte.js:203:8)
load_component @ Toast.svelte:8
(anonymous) @ Blocks.svelte:284
prepare_components @ Blocks.svelte:228
$$self.$$.update @ Blocks.svelte:157
init @ svelte.js:3246
Blocks @ Blocks.svelte:707
create_if_block_1 @ Index.svelte:423
p @ Index.svelte:371
update_slot_base @ svelte.js:203
p @ Embed.svelte:27
update @ svelte.js:2128
flush @ svelte.js:2088
Promise.then (async)
schedule_update @ svelte.js:2029
make_dirty @ svelte.js:3183
(anonymous) @ svelte.js:3241
(anonymous) @ Index.svelte:268
await in (anonymous) (async)
run @ svelte.js:41
(anonymous) @ svelte.js:3149
flush @ svelte.js:2108
init @ svelte.js:3266
Index @ Index.svelte:355
connectedCallback @ main.ts:109
await in connectedCallback (async)
create_custom_element @ main.ts:211
(anonymous) @ main.ts:214
Tabs.svelte:82 Attempted to select a non-interactive or hidden tab.
change_tab @ Tabs.svelte:82
$$self.$$.update @ Tabs.svelte:86
init @ svelte.js:3246
Tabs @ Tabs.svelte:86
create_fragment @ Index.svelte:7
init @ svelte.js:3250
Index @ Index.svelte:21
construct_svelte_component @ svelte.js:1613
create_fragment$2 @ Render.svelte:72
init @ svelte.js:3250
Render @ Render.svelte:63
create_each_block @ Render.svelte:83
create_if_block$1 @ Render.svelte:83
create_default_slot @ Render.svelte:82
create_slot @ svelte.js:165
create_fragment @ Index.svelte:19
init @ svelte.js:3250
Index @ Index.svelte:8
construct_svelte_component @ svelte.js:1613
create_fragment$2 @ Render.svelte:72
init @ svelte.js:3250
Render @ Render.svelte:63
create_each_block @ Render.svelte:83
create_if_block$1 @ Render.svelte:83
create_default_slot @ Render.svelte:82
create_slot @ svelte.js:165
create_fragment @ Index-7cbc3ec9.js:26
init @ svelte.js:3250
Index @ Index.svelte:6
construct_svelte_component @ svelte.js:1613
create_fragment$2 @ Render.svelte:72
init @ svelte.js:3250
Render @ Render.svelte:63
create_each_block @ Render.svelte:83
create_if_block$1 @ Render.svelte:83
create_default_slot @ Render.svelte:82
create_slot @ svelte.js:165
create_fragment @ Index.svelte:19
init @ svelte.js:3250
Index @ Index.svelte:8
construct_svelte_component @ svelte.js:1613
create_fragment$2 @ Render.svelte:72
init @ svelte.js:3250
Render @ Render.svelte:63
create_fragment$1 @ MountComponents.svelte:2
init @ svelte.js:3250
MountComponents @ MountComponents.svelte:16
create_if_block_4 @ Blocks.svelte:748
p @ Blocks.svelte:754
update @ svelte.js:2128
flush @ svelte.js:2088
Promise.then (async)
schedule_update @ svelte.js:2029
make_dirty @ svelte.js:3183
(anonymous) @ svelte.js:3241
blocks_ready_binding @ Index.svelte:347
blocks_ready_binding @ Index.svelte:423
(anonymous) @ svelte.js:3240
(anonymous) @ Blocks.svelte:297
Promise.then (async)
(anonymous) @ Blocks.svelte:296
Promise.then (async)
prepare_components @ Blocks.svelte:294
$$self.$$.update @ Blocks.svelte:157
init @ svelte.js:3246
Blocks @ Blocks.svelte:707
create_if_block_1 @ Index.svelte:423
p @ Index.svelte:371
update_slot_base @ svelte.js:203
p @ Embed.svelte:27
update @ svelte.js:2128
flush @ svelte.js:2088
Promise.then (async)
schedule_update @ svelte.js:2029
make_dirty @ svelte.js:3183
(anonymous) @ svelte.js:3241
(anonymous) @ Index.svelte:268
await in (anonymous) (async)
run @ svelte.js:41
(anonymous) @ svelte.js:3149
flush @ svelte.js:2108
init @ svelte.js:3266
Index @ Index.svelte:355
connectedCallback @ main.ts:109
await in connectedCallback (async)
create_custom_element @ main.ts:211
(anonymous) @ main.ts:214
Tabs.svelte:82 Attempted to select a non-interactive or hidden tab.

@abidlabs
Copy link
Member

Ah interesting, I thought I fixed this issue. Can you possibly share the code for the Gradio app as well?

@pseudotensor
Copy link
Contributor Author

I think any gradio app will do it, let me launch a trivial one.

@pseudotensor
Copy link
Contributor Author

pseudotensor commented Feb 12, 2024

The full app I'm launching is h2oGPT.

This one doesn't behave the same, but still behaves badly:

import os
os.environ['GRADIO_SERVER_PORT'] = '14001'

import gradio as gr
import random
import time


with gr.Blocks() as demo:
    chatbot = gr.Chatbot()
    msg = gr.Textbox()
    clear = gr.ClearButton([msg, chatbot])

    def respond(message, chat_history):
        bot_message = random.choice(["How are you?", "I love you", "I'm very hungry"])
        chat_history.append((message, bot_message))
        time.sleep(2)
        return "", chat_history

    msg.submit(respond, [msg, chatbot], [msg, chatbot])

if __name__ == "__main__":
    demo.launch(share=False, server_name='0.0.0.0')

image

index.js:1181 Mixed Content: The page at 'https://xxxx.ai/' was loaded over HTTPS, but requested an insecure resource 'http://xxxx.ai/info'. This request has been blocked; the content must be served over HTTPS.
view_api @ index.js:1181
config_success @ index.js:441
(anonymous) @ index.js:481
await in (anonymous) (async)
client2 @ index.js:403
(anonymous) @ Index.svelte:254
run @ svelte.js:41
(anonymous) @ svelte.js:3149
flush @ svelte.js:2108
init @ svelte.js:3266
Index @ Index.svelte:357
connectedCallback @ main.ts:109
await in connectedCallback (async)
create_custom_element @ main.ts:211
(anonymous) @ main.ts:214
index.js:443 Could not get api details: Failed to fetch
config_success @ index.js:443
await in config_success (async)
(anonymous) @ index.js:481
await in (anonymous) (async)
client2 @ index.js:403
(anonymous) @ Index.svelte:254
run @ svelte.js:41
(anonymous) @ svelte.js:3149
flush @ svelte.js:2108
init @ svelte.js:3266
Index @ Index.svelte:357
connectedCallback @ main.ts:109
await in connectedCallback (async)
create_custom_element @ main.ts:211
(anonymous) @ main.ts:214
css.ts:18 Mixed Content: The page at 'https://xxxx.ai/' was loaded over HTTPS, but requested an insecure stylesheet 'http://xxxx.ai/theme.css'. This request has been blocked; the content must be served over HTTPS.
(anonymous) @ css.ts:18
mount_css @ css.ts:12
mount_custom_css @ Index.svelte:139
(anonymous) @ Index.svelte:267
await in (anonymous) (async)
run @ svelte.js:41
(anonymous) @ svelte.js:3149
flush @ svelte.js:2108
init @ svelte.js:3266
Index @ Index.svelte:357
connectedCallback @ main.ts:109
await in connectedCallback (async)
create_custom_element @ main.ts:211
(anonymous) @ main.ts:214
css.ts:15 Unable to preload CSS for http://xxxx.ai/theme.css

Note that direct port access to that simple gradio app is still good like h2oGPT is good:

image

Nothing appears in dev console for this direct port access.

If it's helpful, I can see if there's a specific extra thing in h2oGPT that makes it even worse (i.e. only loading screen), but I'd guess the errors provided give sufficient hints.

I'm not an nginx expert, but if required I can figure out how to start that locally so a remote connection would fail in this way. But hopefully there's enough info so far for some insights. I guess gradio testing might benefit from nginx and k8, google colab, and other cloud testing.

@FurkanGozukara
Copy link

FurkanGozukara commented Feb 12, 2024

we also have issue with runpod proxy

css is being blocked

gradio live share working normal no issues

gradio==4.18.0
gradio_client==0.10.0

image

image

image

@abidlabs
Copy link
Member

@FurkanGozukara are you open to sharing your runpod url if its a public url?

@FurkanGozukara
Copy link

@pseudotensor
Copy link
Contributor Author

pseudotensor commented Feb 13, 2024

@abidlabs We setup a nginx case for you as well. The config is:

server {
    listen 13001;
    server_name gpt-gradio.h2o.ai;

    location / {
        proxy_pass http://52.0.25.199:14051/;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Scheme $scheme;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $http_connection;
        proxy_http_version 1.1;
    }
}

Raw system is at: http://52.0.25.199:14051/
proxy DNS is https://gpt-gradio.h2o.ai/

Raw shows:

image

Proxy shows:

image

image

@abidlabs
Copy link
Member

Thank you @pseudotensor and @FurkanGozukara! Looking into this

@abidlabs abidlabs removed the needs repro Awaiting full reproduction label Feb 13, 2024
@abidlabs
Copy link
Member

I think I know the problem, setting up my own nginx server to test

@abidlabs
Copy link
Member

@pseudotensor it looks like the site is down, would you be able to restart please?

@pseudotensor
Copy link
Contributor Author

It's back, thanks!

@FurkanGozukara
Copy link

@pseudotensor it looks like the site is down, would you be able to restart please?

I left it open like 1 day yesterday :/ it burns money on runpod haha

if you are here reply me i will open again

@abidlabs
Copy link
Member

Nw @FurkanGozukara I'm working off of the logs from @pseudotensor's for now. I'll open a PR for you guys to try soon

@abidlabs
Copy link
Member

abidlabs commented Feb 14, 2024

@FurkanGozukara @pseudotensor could you please try installing this version of gradio and seeing if it resolves the issue?

pip install https://gradio-builds.s3.amazonaws.com/9b8810ff9af4d9a50032752af09cefcf2ef7a7ac/gradio-4.18.0-py3-none-any.whl

@pseudotensor
Copy link
Contributor Author

Yup, that works!

image

I can try full h2oGPT app too.

@abidlabs
Copy link
Member

That'd be great! Let me know if you see any issues

@pseudotensor
Copy link
Contributor Author

Yup, seems all good now for 4.18.0 build that you shared.

image

@pseudotensor
Copy link
Contributor Author

I played around with a few things and don't notice any issues. So probably back to 4.17.0 behavior, thanks!

@abidlabs
Copy link
Member

Amazing, thanks for confirming!

@FurkanGozukara
Copy link

FurkanGozukara commented Feb 14, 2024

@FurkanGozukara @pseudotensor could you please try installing this version of gradio and seeing if it resolves the issue?

pip install https://gradio-builds.s3.amazonaws.com/9b8810ff9af4d9a50032752af09cefcf2ef7a7ac/gradio-4.18.0-py3-none-any.whl

hello. I just tested and still same error for me :/

when you are here let me know i will start an instance for you on a cheap gpu and leave open

image

pip freeze

(venv) root@1e2d75a2f42f:/workspace# pip freeze
accelerate==0.27.2
aiofiles==23.2.1
altair==5.2.0
annotated-types==0.6.0
anyio==4.2.0
attrs==23.2.0
bitsandbytes==0.42.0
certifi==2024.2.2
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
contourpy==1.2.0
cycler==0.12.1
deepspeed==0.13.2
diffusers @ git+https://github.com/kashif/diffusers.git@c4d20110774dbcc6ada7e62b290500f8ad777fba
exceptiongroup==1.2.0
fastapi==0.109.2
ffmpy==0.3.2
filelock==3.13.1
fonttools==4.48.1
fsspec==2024.2.0
gradio @ https://gradio-builds.s3.amazonaws.com/9b8810ff9af4d9a50032752af09cefcf2ef7a7ac/gradio-4.18.0-py3-none-any.whl
gradio_client==0.10.0
h11==0.14.0
hjson==3.1.0
httpcore==1.0.2
httpx==0.26.0
huggingface-hub==0.20.3
idna==3.6
importlib-metadata==7.0.1
importlib-resources==6.1.1
Jinja2==3.1.3
jsonschema==4.21.1
jsonschema-specifications==2023.12.1
kiwisolver==1.4.5
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib==3.8.2
mdurl==0.1.2
mpmath==1.3.0
networkx==3.2.1
ninja==1.11.1.1
numpy==1.26.4
nvidia-cublas-cu12==12.1.3.1
nvidia-cuda-cupti-cu12==12.1.105
nvidia-cuda-nvrtc-cu12==12.1.105
nvidia-cuda-runtime-cu12==12.1.105
nvidia-cudnn-cu12==8.9.2.26
nvidia-cufft-cu12==11.0.2.54
nvidia-curand-cu12==10.3.2.106
nvidia-cusolver-cu12==11.4.5.107
nvidia-cusparse-cu12==12.1.0.106
nvidia-nccl-cu12==2.19.3
nvidia-nvjitlink-cu12==12.3.101
nvidia-nvtx-cu12==12.1.105
orjson==3.9.13
packaging==23.2
pandas==2.2.0
pillow==10.2.0
psutil==5.9.8
py-cpuinfo==9.0.0
pydantic==2.6.1
pydantic_core==2.16.2
pydub==0.25.1
Pygments==2.17.2
pynvml==11.5.0
pyparsing==3.1.1
python-dateutil==2.8.2
python-multipart==0.0.9
pytz==2024.1
PyYAML==6.0.1
referencing==0.33.0
regex==2023.12.25
requests==2.31.0
rich==13.7.0
rpds-py==0.18.0
ruff==0.2.1
safetensors==0.4.2
scipy==1.12.0
semantic-version==2.10.0
shellingham==1.5.4
six==1.16.0
sniffio==1.3.0
starlette==0.36.3
sympy==1.12
tokenizers==0.15.2
tomlkit==0.12.0
toolz==0.12.1
torch==2.2.0+cu121
torchaudio==2.2.0+cu121
torchvision==0.17.0+cu121
tqdm==4.66.2
transformers==4.37.2
triton==2.2.0
typer==0.9.0
typing_extensions==4.9.0
tzdata==2024.1
urllib3==2.2.0
uvicorn==0.27.1
websockets==11.0.3
xformers==0.0.24
zipp==3.17.0
(venv) root@1e2d75a2f42f:/workspace# 

@abidlabs
Copy link
Member

Can you please try with gradio==4.19.0 -- we just released

@FurkanGozukara
Copy link

Can you please try with gradio==4.19.0 -- we just released

hello i just tested same

here you can test running on rtx 4090 please let me know if you are available

https://eneoz4xloaxllz-7861.proxy.runpod.net/

@abidlabs
Copy link
Member

The problem seems to be that the Runpod Proxy isn't passing along the headers properly.

I see this request in the logs:

image

So its trying to get the theme from "https://localhost:7860/". I can also confirm this by going to:

https://eneoz4xloaxllz-7861.proxy.runpod.net/config

and looking at the bottom most part of the dict, where it says that "root": "https://localhost:7860/"

So this tells me two things:

  • The"x-forwarded-proto" header is being set correctly, since https is being used
  • The "host" header is not being set, because it should reflect the public url instead of localhost

Do you know if its possible to configure the Runpod Proxy @FurkanGozukara? You'd want to set it up like this:

    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;

(if its nginx)

or

    ProxyPreserveHost On
    RequestHeader set X-Forwarded-Proto "http"

if its apache

@FurkanGozukara
Copy link

@abidlabs I will forward this to them. can i close pod now?

@abidlabs
Copy link
Member

Yes sure thanks @FurkanGozukara!

@FurkanGozukara
Copy link

FurkanGozukara commented Feb 15, 2024

Yes sure thanks @FurkanGozukara!

hello again. they made the changes but still same error

here can you test?

https://eneoz4xloaxllz-3001.proxy.runpod.net/

they suspect this : #4463

@abidlabs
Copy link
Member

The host header is still not being set correctly as far as I can tell. You can check by going to: https://eneoz4xloaxllz-3001.proxy.runpod.net/config and looking at the root. This is directly the fastapi.request.url, which should match the url of the page https://eneoz4xloaxllz-3001.proxy.runpod.net, not some IP address

@FurkanGozukara
Copy link

The host header is still not being set correctly as far as I can tell. You can check by going to: https://eneoz4xloaxllz-3001.proxy.runpod.net/config and looking at the root. This is directly the fastapi.request.url, which should match the url of the page https://eneoz4xloaxllz-3001.proxy.runpod.net, not some IP address

thanks forwarding right now

@grumpyp
Copy link

grumpyp commented Feb 20, 2024

I have similar issues working with privateGPT

zylon-ai/private-gpt#1623

@pseudotensor
Copy link
Contributor Author

@abidlabs Actually I still have issues with this. gr.Audio playing gets stuck and doesn't play, and then never goes to stop/pause mode after clicking play. However, this only happens for the indirect nginx DNS not the direct port.

So should re-open this issue.

@abidlabs
Copy link
Member

Ok let me reopen so that we can figure this out -- so the only issues you are seeing are with gr.Audio @pseudotensor?

@abidlabs abidlabs reopened this Feb 24, 2024
@abidlabs
Copy link
Member

Oh noticed that you opened a separate issue with more details -- will close this

@pseudotensor
Copy link
Contributor Author

Ya sorry, related to this issue, ok to only look at new one, but I guess seems systemic problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cloud Issues that only happen when deploying Gradio on cloud services
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants