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
[โ€“] alloca 2 points 1 year ago (1 children)

So, I want it to use 100% of all of the cores, but at a lower priority.

It might end up being simpler to just run whisper "directly" on the host machine, so I can nice it like normal

[โ€“] 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.