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

[BUG/Help] 我可以使用我自己的公网ip吗 #341

Closed
1 task done
mxtilx opened this issue Apr 2, 2023 · 5 comments
Closed
1 task done

[BUG/Help] 我可以使用我自己的公网ip吗 #341

mxtilx opened this issue Apr 2, 2023 · 5 comments

Comments

@mxtilx
Copy link

mxtilx commented Apr 2, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

在使用web_demo.py时
我没找到成功修改/指定ip的方法

Expected Behavior

No response

Steps To Reproduce

在Anaconda中,运行了此项目

Environment

- OS:win10 企业版 LTSC
- Python: 3.10
- Transformers: 4.27.1
- PyTorch: 2.0.0
- CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) :false

Anything else?

@mxtilx mxtilx closed this as completed Apr 2, 2023
@mxtilx mxtilx reopened this Apr 2, 2023
@kenneth104
Copy link

我这边Linux,使用socat转发公网入端口到localhost对应端口
windows也可以用防火墙做端口转发

正确做法是更改其中的python webui启动参数(我并不会)

@JulyFinal
Copy link

JulyFinal commented Apr 3, 2023

其中 --server.serverAddress 我没用过不确定,请自己验证。

按照你的需求只需要将server_name 或 serverAddress 设置为你的主机ip(不要设置能0.0.0.0或127.0.0.1,这个只能本机访问)就行。如果你是公司内的服务器可能还需要设置nginx

@gptbert
Copy link

gptbert commented Apr 3, 2023

gradio需要使用https,建议参考binary-husky/gpt_academic#155 (comment)

@336655asd
Copy link

demo.queue().launch(share=True, inbrowser=True, server_name='0.0.0.0', server_port=8080)

@duzx16 duzx16 closed this as completed Apr 12, 2023
@yuanmouren1hao
Copy link

demo.queue().launch(share=True, inbrowser=True, server_name='0.0.0.0', server_port=8080)

有用,谢谢

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

7 participants