this post was submitted on 13 Jul 2023
7 points (100.0% liked)

Docker

452 readers
9 users here now

founded 1 year ago
MODERATORS
 

Hi everyone!

I run a few low-resource-usage containers on a home server that also has things that run directly on the metal. I'm starting to run a simple Docker container that just lets me run the Whisper speech-to-text engine. That container basically uses all of my CPU power for several hours, which is fine, but I want to make sure it's not starving other processes of CPU time.

In a non-Docker setup, I'd just nice the program, and that'd be it, but that doesn't seem to work in this context. I've found this Stack Overflow post that recommends using the --cpu-shares flag with docker run, but I haven't been able to find out if that allows you to deprioritize the container relative to everything else using the CPU (such as non-containerized tasks) or just relative to other containers.

Any help would be appreciated!

you are viewing a single comment's thread
view the rest of the comments
[–] gaylord_fartmaster 1 points 1 year ago

If you want to keep it containerized, an LXC would let you limit CPU usage vs. host processes like you're wanting.