Commit 6c55ab0d authored by laibao's avatar laibao
Browse files

Updata Readme

添加端口映射
parent 73241d30
...@@ -141,31 +141,43 @@ curl http://localhost:8000/v1/chat/completions \ ...@@ -141,31 +141,43 @@ curl http://localhost:8000/v1/chat/completions \
pip install gradio pip install gradio
``` ```
2.安装必要文件 2.安装必要文件与端口映射
2.1 启动gradio服务,根据提示操作 2.1 启动gradio服务,根据提示操作
``` ```
python gradio_openai_vlm_webserver.py --model "/mnt/data/llm-models/llava/llava-1.5-7b-hf" --model-url http://localhost:8000/v1 python gradio_openai_vlm_webserver.py --model "/mnt/data/llm-models/llava/llava-1.5-7b-hf" --model-url http://localhost:8000/v1 --host "0.0.0.0" --port 8001
``` ```
2.2 更改文件权限 2.2 更改文件权限
打开提示下载文件目录,输入以下命令给予权限 打开提示下载文件目录,输入以下命令给予权限
``` ```
chmod +x frpc_linux_amd64_v0.* chmod +x frpc_linux_amd64_v0.*
``` ```
2.3端口映射
```
ssh -L 8000:计算节点IP:8000 -L 8001:计算节点IP:8001 用户名@登录节点 -p 登录节点端口
```
3.启动OpenAI兼容服务 3.启动OpenAI兼容服务
`cd examples` `cd examples`
``` ```
python -m vllm.entrypoints.openai.api_server --model /mnt/data/llm-models/llava/llava-1.5-7b-hf --image-input-type pixel_values --image-token-id 32000 --image-input-shape 1,3,336,336 --image-feature-size 576 --chat-template template_llava.jinja python -m vllm.entrypoints.openai.api_server --model /mnt/data/llm-models/llava/llava-1.5-7b-hf --image-input-type pixel_values --image-token-id 32000 --image-input-shape 1,3,336,336 --image-feature-size 576 --chat-template template_llava.jinja --port 8000 --host "0.0.0.0"
```
4.启动gradio服务
```
python gradio_openai_vlm_webserver.py --model "/mnt/data/llm-models/llava/llava-1.5-7b-hf" --model-url http://localhost:8000/v1 --host "0.0.0.0" --port 8001"
``` ```
4.使用对话服务 5.使用对话服务
在浏览器中输入本地 URL,可以使用 Gradio 提供的对话服务。 在浏览器中输入本地 URL,可以使用 Gradio 提供的对话服务。
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment