Skip to content

Conversation

@qxo
Copy link

@qxo qxo commented Dec 28, 2025

  • 模型容器的MEM/CPU限制可通过实例节点环境变量GPUSTACK_RUNTIME_DEPLOY_DEFAULT_MEM/GPUSTACK_RUNTIME_DEPLOY_DEFAULT_CPU 或模型编辑界面环境变量ENV_MEN/ENV_CPU来配置

  • pause 容器默认限制MEM/CPU, 同时也通过worker环境变量来配置GPUSTACK_RUNTIME_DEPLOY_PAUSE_MEM/GPUSTACK_RUNTIME_DEPLOY_PAUSE_CPU_SHARES

  • 为防止内存过度分配,指mem_limit时默认不指mem_reservation=mem_limit,需要可单独设置mem_reservation

  • TODO 以上常量命名怎么更有意义有商榷

*  模型容器的MEM/CPU限制可通过实例节点环境变量GPUSTACK_RUNTIME_DEPLOY_DEFAULT_MEM/GPUSTACK_RUNTIME_DEPLOY_DEFAULT_CPU  或模型编辑界面环境变量ENV_MEN/ENV_CPU来配置

*  pause 容器默认限制MEM/CPU, 同时也通过worker环境变量来配置GPUSTACK_RUNTIME_DEPLOY_PAUSE_MEM/GPUSTACK_RUNTIME_DEPLOY_PAUSE_CPU_SHARES

*  为防止内存过度分配,指mem_limit时默认不指mem_reservation=mem_limit,需要可单独设置mem_reservation

* TODO 以上常量命名怎么更有意义有商榷
@thxCode
Copy link
Contributor

thxCode commented Dec 29, 2025

please make above changes on gpustack/gpustack, runtime already provided a configuration entrence here:

@dataclass_json
@dataclass
class ContainerResources(dict[str, float | int | str]):
"""
Resources for a container.
Attributes:
cpu (float | None):
CPU limit for the container in cores.
memory (str | int | float | None):
Memory limit for the container.
"""
.

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

Successfully merging this pull request may close these issues.

2 participants