测试, 生产10.182.17.2:/data1/tlw/image_classification (环境目录:/data1/tlw/DeepSeek-OCR)10.182.17.2:/data1/tlw/timm10.51.0.1:/data/image_classification screen -r HunyuanOCR_1CUDA_VISIBLE_DEVICES=0 vllm serve /data1/models/HunyuanOCR \
--host 0.0.0.0 \
--port 8001 \
--served-model-name HunyuanOCR \
--no-enable-prefix-caching \
--mm-processor-cache-gb 0 \
--gpu-memory-utilization 0.2 \
--enable-log-requests \
--enable-log-outputs \
2>&1 | tee /data1/tlw/image_classification/logs/vllm_8001.logCtrl +a +d screen -r HunyuanOCR_2CUDA_VISIBLE_DEVICES=1 vllm serve /data1/models/HunyuanOCR \
--host 0.0.0.0 \
--port 8002 \
--served-model-name HunyuanOCR \
--no-enable-prefix-caching \
--mm-processor-cache-gb 0 \
--gpu-memory-utilization 0.2 \
--enable-log-requests \
--enable-log-outputs \
2>&1 | tee /data1/tlw/image_classification/logs/vllm_8002.logCtrl +a +d 负载均衡端口:8000 nohup uvicorn app:app --host 0.0.0.0 --port 8005 --workers 1 > logs/app.log 2>&1 & screen -r HunyuanOCR_1CUDA_VISIBLE_DEVICES=2 vllm serve /data/models/HunyuanOCR-1.5 \
--served-model-name HunyuanOCR \
-tp 1 \
--limit-mm-per-prompt '{"image":4,"video":0}' \
--trust-remote-code \
--host 0.0.0.0 \
--port 8001 \
--gpu-memory-utilization 0.45 \
--max-model-len 32768 \
--max-num-batched-tokens 32768 \
--api-key sk-lakala-hunyuanocr \
--no-enable-prefix-caching \
--mm-processor-cache-gb 0 \
2>&1 | tee /data/HunyuanOCR-1.5/vllm_8001.logCtrl +a +d screen -r HunyuanOCR_2 CUDA_VISIBLE_DEVICES=3 vllm serve /data/models/HunyuanOCR-1.5 \
--served-model-name HunyuanOCR \
-tp 1 \
--limit-mm-per-prompt '{"image":4,"video":0}' \
--trust-remote-code \
--host 0.0.0.0 \
--port 8002 \
--gpu-memory-utilization 0.45 \
--max-model-len 32768 \
--max-num-batched-tokens 32768 \
--api-key sk-lakala-hunyuanocr \
--no-enable-prefix-caching \
--mm-processor-cache-gb 0 \
2>&1 | tee /data/HunyuanOCR-1.5/vllm_8002.logCtrl +a +d 10.51.0.11 (生产5090D服务器)/data/tlw/image_classification$ source .venv/bin/activate screen -r HunyuanOCR_1CUDA_VISIBLE_DEVICES=2 vllm serve /data/tlw/models/HunyuanOCR-1.5 \
--served-model-name HunyuanOCR \
-tp 1 \
--limit-mm-per-prompt '{"image":4,"video":0}' \
--trust-remote-code \
--host 0.0.0.0 \
--port 8001 \
--gpu-memory-utilization 0.3 \
--max-model-len 32768 \
--max-num-batched-tokens 32768 \
--api-key sk-lakala-hunyuanocr \
--no-enable-prefix-caching \
--mm-processor-cache-gb 0 \
2>&1 | tee /data/tlw/HunyuanOCR-1.5/vllm_8001.logCtrl +a +d screen -r HunyuanOCR_2CUDA_VISIBLE_DEVICES=3 vllm serve /data/tlw/models/HunyuanOCR-1.5 \
--served-model-name HunyuanOCR \
-tp 1 \
--limit-mm-per-prompt '{"image":4,"video":0}' \
--trust-remote-code \
--host 0.0.0.0 \
--port 8002 \
--gpu-memory-utilization 0.3 \
--max-model-len 32768 \
--max-num-batched-tokens 32768 \
--api-key sk-lakala-hunyuanocr \
--no-enable-prefix-caching \
--mm-processor-cache-gb 0 \
2>&1 | tee /data/tlw/HunyuanOCR-1.5/vllm_8002.log Ctrl +a +d测试:
curl -X POST http://10.51.0.11:8003/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-lakala-hunyuanocr" \
-d '{
"model": "HunyuanOCR",
"messages": [
{"role": "system", "content": ""},
{"role": "user", "content": [
{"type": "image_url", "image_url": {"url": "http://lkl-zf-private-tms-test.oss-cn-shanghai.aliyuncs.com/partner/C0815159791575658496/20260114/企业授权书申请1.png"}},
{"type": "text", "text": "提取图中的文字,并以纯文本格式返回"}
]}
],
"temperature": 0.0,
"top_p": 1.0,
"top_k": -1,
"repetition_penalty": 1.08,
"skip_special_tokens": true,
"max_tokens": 4096,
"stream": false,
"seed": 1234
}' nohup uvicorn app:app --host 0.0.0.0 --port 8005 --workers 1 > logs/app.log 2>&1 & 负载均衡端口:8003,外部访问:10.61.88.8:31038 图片分类 :POST /predict OCR: POST /HunyuanOCR