ChatGLM2-6B
ChatGLM2-6B copied to clipboard
[BUG/Help] <run web_demo.py on server>
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
When running the web_demo.py on server, it shows Running on local URL: http://127.0.0.1:7860
However, after connecting to the server through Windows shell SSH and doing forwarding, the website cannot be opened in the browser within the same LAN.
Expected Behavior
Does anyone know what's going on?
Steps To Reproduce
-
python web_demo.py
-
windows shell: ssh -L7861:compute3:7860 user_name@ip_address
-
open browser: http://127.0.0.1:7861/
Environment
- OS:
- Python:3.9
- Transformers:
- PyTorch:2.0
- CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) :cuda-11.7
Anything else?
No response
I think you should replace compute3
with 127.0.0.1
I think you should replace
compute3
with127.0.0.1
Thank you very much, I tried, but it didn't work.
- terminal:
ssh -L 0.0.0.0:7860:localhost:7860 [email protected]
- in remote server: python web_demo.py
- local PC or LAN: http://localhost:7860 , http://your_ip_in_LAN:7860
change your step 1 and 2.
- terminal:
ssh -L 0.0.0.0:7860:localhost:7860 [email protected]
- in remote server: python web_demo.py
- local PC or LAN: http://localhost:7860 , http://your_ip_in_LAN:7860
change your step 1 and 2.
Thank you,still didn't work...
- terminal:
ssh -L 0.0.0.0:7860:localhost:7860 [email protected]
- in remote server: python web_demo.py
- local PC or LAN: http://localhost:7860 , http://your_ip_in_LAN:7860
change your step 1 and 2.
Thank you,still didn't work...
Then may be some firewall settings, or do you have some web proxies locally? The steps are no problem.
Or you can use vscode for remote and then start python web_demo.py
in vscode's command line. When vscode remotely starts the service, it will automatically do port mapping, and normally, the web page will pop up directly in your browser after startup.