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

请问要怎么改docker 网站分享的port 从7860换成其他port #10

Closed
ppkliu opened this issue Jul 31, 2023 · 1 comment
Closed

Comments

@ppkliu
Copy link

ppkliu commented Jul 31, 2023

我将docker script port 7860换成8000了,
docker run --gpus all --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 --rm -it -v pwd/LinkSoul:/app/LinkSoul -p
7860:8000 soulteary/llama2:7b-cn

但是启动之后画面还是显示 7860
Running on local URL: http://0.0.0.0:7860

To create a public link, set share=True in launch().

请问这个网站的port mapping 可以更改吗?

@ppkliu
Copy link
Author

ppkliu commented Jul 31, 2023

I answer myself like as following.

  1. modifiy app.py in the model folder like this example: (/llama2-7b-cn/app.py)
    add server_port=8000 (8000 is your assign port)
demo.queue(max_size=20).launch(
                         server_name="0.0.0.0",
                         server_port=8000,
  1. re-build the image in build command
    source /scripts/make-7b-cn.sh

  2. run the port change image
    source /scripts/run-7b-cn.sh

@ppkliu ppkliu closed this as completed Jul 31, 2023
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

1 participant