Skip Navigation

How to lower priority of container

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!

3

You're viewing a single thread.

3 comments