[GH-ISSUE #1118] [Feature] docker版增加健康监控、自动启动服务功能和日志功能 #783

Open
opened 2026-10-29 14:44:25 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @yeungtuzi on GitHub (Apr 11, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1118

检查清单

  • 1. 如果您提出的不是新功能而是问题,请在讨论区发起讨论 https://github.com/kvcache-ai/ktransformers/discussions。否则该 issue 将被关闭
  • 2. 为方便社区交流,我将使用中文/英文或附上英文/中文翻译(如使用其他语言)。未附带翻译的非英文/中文内容可能会被关闭

需求背景

1.健康监控应该很好做,有个心跳信号就好
2.自动启动服务,考虑到ktransformers非常重,而且可能需要用户自行调节参数,是否可以预设一个xxxx.sh文件,只要检测到这个文件,容器启动时就会运行这个xxx.sh
3.把运行输出重定向到stderr(?)以便用户可以使用docker logs ktransformers来查看运行日志

相关资源

No response

Originally created by @yeungtuzi on GitHub (Apr 11, 2025). Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1118 ### 检查清单 - [x] 1. 如果您提出的不是新功能而是问题,请在讨论区发起讨论 https://github.com/kvcache-ai/ktransformers/discussions。否则该 issue 将被关闭 - [x] 2. 为方便社区交流,我将使用中文/英文或附上英文/中文翻译(如使用其他语言)。未附带翻译的非英文/中文内容可能会被关闭 ### 需求背景 1.健康监控应该很好做,有个心跳信号就好 2.自动启动服务,考虑到ktransformers非常重,而且可能需要用户自行调节参数,是否可以预设一个xxxx.sh文件,只要检测到这个文件,容器启动时就会运行这个xxx.sh 3.把运行输出重定向到stderr(?)以便用户可以使用docker logs ktransformers来查看运行日志 ### 相关资源 _No response_
Author
Owner

@yeungtuzi commented on GitHub (Apr 11, 2025):

我的启动脚本
l# cat /model/start.sh

#!/bin/bash
export HF_ENDPOINT="https://hf-mirror.com"
cd /workspace/ktransformers/
nohup ktransformers --model_path ~/.cache/huggingface/hub/models--deepseek-ai--DeepSeek-R1/snapshots/56d4cbbb4d29f4355bab4b9a39ccb717a14ad5ad/ --gguf_path /model/DeepSeek-R1-Q4_K_M --port 10002 --max_new_tokens=32768 --cache_lens=131072 --model_name "DeepSeek-R1"  --chunk_size 256 --max_batch_size 4 --backend_type balance_serve --optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml --force_think --cpu_infer 60 2>&1 &
<!-- gh-comment-id:2796240676 --> @yeungtuzi commented on GitHub (Apr 11, 2025): 我的启动脚本 l# cat /model/start.sh ``` #!/bin/bash export HF_ENDPOINT="https://hf-mirror.com" cd /workspace/ktransformers/ nohup ktransformers --model_path ~/.cache/huggingface/hub/models--deepseek-ai--DeepSeek-R1/snapshots/56d4cbbb4d29f4355bab4b9a39ccb717a14ad5ad/ --gguf_path /model/DeepSeek-R1-Q4_K_M --port 10002 --max_new_tokens=32768 --cache_lens=131072 --model_name "DeepSeek-R1" --chunk_size 256 --max_batch_size 4 --backend_type balance_serve --optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml --force_think --cpu_infer 60 2>&1 & ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/ktransformers#783
No description provided.