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

fix: graceful shutdown for Docker images #10815

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

co42
Copy link
Contributor

@co42 co42 commented Dec 13, 2024

Issue

When using the llama.cpp image in Kubernetes it does not stop gracefully (or at all) when receiving a SIGTERM.
It is due to bash intercepting it and not forwarding it to llama-server.

Fix

By using exec the process 0 become llama-server which handle directly the signals.

@co42 co42 requested a review from ngxson as a code owner December 13, 2024 15:44
@github-actions github-actions bot added the devops improvements to build systems and github actions label Dec 13, 2024
Copy link
Collaborator

@ngxson ngxson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know about this trick earlier, thanks!

@ngxson ngxson merged commit 11e07fd into ggml-org:master Dec 13, 2024
2 checks passed
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Dec 20, 2024
tinglou pushed a commit to tinglou/llama.cpp that referenced this pull request Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops improvements to build systems and github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants